A static function for creating NSParagraphStyle objects
Swift
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
NSParagraphStyle+With.swift
README.md

README.md

NSParagraphStyle.with(...)

License

Adds the static function with to NSParagraphStyle, which allows immutable paragraph styles to be created with arbitrary parameters, in one function call.

NSParagraphStyle.with(alignment: .Center, lineSpacing: 10)

All NSMutableParagraphStyle properties are supported, and all parameters may be omitted, with the default value from NSParagraphStyle.defaultParagraphStyle() being used in that case.

Installation

There's just one file - submodules, direct download, etc.