Latest 0.2.0
Homepage https://github.com/Arror/AttributesBuilder
License MIT
Platforms ios 8.0
Authors

Installation

pod 'AttributesBuilder'

Usage

Sample

let builder1 = AttributesBuilder()
    .color(.darkGray)
    .font(.systemFont(ofSize: 14.0))

let builder2 = builder1
    .copied
    .font(.systemFont(ofSize: 24.0))

let builder3 = AttributesBuilder()
    .color(.red)
    .font(.boldSystemFont(ofSize: 18.0))

let content = "CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 30 thousand libraries and is used in over 1.9 million apps. CocoaPods can help you scale your projects elegantly."

self.contentLabel.attributedText = content
    .rs.rendered(by: builder1)
    // Range support.
    .rs.rendered(by: builder2, range: 0..<1)
    // Regex support.
    .rs.rendered(by: builder3, regexPattern: "Swift and Objective-C")

Latest podspec

{
    "name": "AttributesBuilder",
    "version": "0.2.0",
    "license": "MIT",
    "summary": "Attributes builder.",
    "homepage": "https://github.com/Arror/AttributesBuilder",
    "authors": {
        "Arror": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Arror/AttributesBuilder.git",
        "tag": "0.2.0"
    },
    "source_files": "Sources/*.swift",
    "platforms": {
        "ios": "8.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This