An elegant way to deal with attributed string in swift

255 阅读1分钟
原文链接: github.com

Build Status Carthage compatible pod version GitHub license

An elegant way to deal with attributed string in swift. It's convenient to create attributed string by .cute, whatever from String, NSString, NSAttributedString or NSMutableAttributedString. It's so amazing that almost all methods support chaining. I create this project just because I met Typeset serveral days ago. But I found it's so hard to use by swift. So I made this. Thanks Typeset by Draveness.

Support

Swift 3.0 & iOS 8+

Installation

CocoaPods

  1. add pod 'CuteAttribute' to your Podfile.
  2. Run pod install OR pod update.
  3. import CuteAttribute

Carthage

  1. Add CuteAttribute to your Cartfile. e.g., github "qiuncheng/CuteAttribute"
  2. Run carthage update --platform ios
  3. Follow the rest of the standard Carthage installation instructions to add CuteAttribute to your project.
  4. import CuteAttribute

Manually

  1. Download the full file.
  2. Drag the CuteAttribute folder to your project.

TODO

  • Documented.
  • Example.
  • Test.
  • More convenience.

Thanks

Typeset : Deal with AttributedString efficiently in Objective-C.

LICENCE

Under MIT License