From ae509972729cea775b67bdb6247039dacbb54d7b Mon Sep 17 00:00:00 2001 From: Ethan Huang Date: Thu, 11 Jul 2019 20:01:20 +0800 Subject: [PATCH] [Added] CHANGELOG [Changed] Update README --- CHANGELOG.md | 10 ++++++++++ README.md | 15 +++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8aa23b5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# NSAttributedStringBuilder CHANGELOG + +All notable changes to this project will be documented in this file. +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +## [0.1] - 2019-07-11 +- Initial version diff --git a/README.md b/README.md index fb29131..97efe34 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,15 @@ let attributedString = NSAttributedString { } ``` +## Features + +| | Features | +| --- | --- | +| ๐Ÿฆ | Open source library written in Swift 5 | +| ๐Ÿฌ | SwiftUI-like syntax | +| ๐Ÿ’ช | Support most attributes in `NSAttributedString.Key` | +| ๐Ÿ“ฆ | Distribution with Swift Package Manager | +| ๐Ÿงช | Fully tested code | ## Requirement **NSAttributedStringBuilder** requires iOS 13, macOS 10.15, tvOS 13, or watchOS 13, because it uses Swift 5.1 features like [Function Builder](https://forums.swift.org/t/function-builders/25167) and [Opaque Result Type](https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md) (the `some` keyword). @@ -51,12 +60,10 @@ To achieve this, `AttributedText.swift` uses `@NSAttributedStringBuilder` to sup Then use `AttributedText` will be like: ![demo](demo.png) -You can clone the [repo](https://github.com/ethanhuang13/NSAttributedStringBuilder) and open ***/SwiftUISampleApp/AttributedTextSample.xcodeproj***. The sample uses `UILabel`, you can also use an `UITextView` or `NSTextView`. +You can clone the [repo](https://github.com/ethanhuang13/NSAttributedStringBuilder) and open ***/SwiftUISampleApp/AttributedTextSample.xcodeproj***. The sample uses `UITextView`, you can also use `UILabel` or `NSTextView`. ## TODO -* Tests for attributes -* Support image attachment -* More... +* Tests pass for image attachment ## Known Issue * `NSAttributedString` does not support link color, therefore `Link` component with a `.color()` modifier has no effect. Alternatively you need to specify in `UITextView.linkTextAttributes` or `.tintColor`.