Easy Attributed Strings in Swift
Swift Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
Sources
Tests/StyledString
.gitignore
.swift-version
LICENSE
README.md
StyledString.podspec

README.md

StyledString CI Status Version License Platform


Example

let hello = StyledString("Hello")
  .withUnderline()
  .with(foregroundColor: .blue)

let world = StyledString("world")
  .withStrikethrough()
  .with(foregroundColor: .red)

label.attributedText = (hello + " " + world)
  .withShadow()
  .with(font: .boldSystemFont(ofSize: 50))
  .attributedString

Result:

Example image

Installation

StyledString is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "StyledString"

Releases

  • 0.6.0 - 2018-04-16 - Style is now public
  • 0.5.0 - 2017-11-02 - Add Swift 4 support
  • 0.4.2 - 2017-01-19 - CocoaPods release
  • 0.4.1 - 2017-01-17 - Add @availability annotations for Swift 3 conversion
  • 0.4.0 - 2017-01-02 - Swift 3 support
  • 0.3.0 - 2016-03-22 - Swift 2.2 support
  • 0.2.0 - 2015-12-19 - Renamed some with* methods
  • 0.1.0 - 2015-12-02 - Initial public release
  • 0.0.0 - 2015-02-02 - Initial private version for project at Q42

License

StyledString is available under the MIT license. See the LICENSE file for more info.