Giter VIP home page Giter VIP logo

easyattributedstring's Introduction

Meet EasyAttributedString

EasyAttributedString

Author EMail MIT
Version Platforms Swift
Build Passing Cocoapods Carthage SPM

🏵 Introduction

EasyAttributedString is a tool kit makes AttributedString much more easier..

📋 Requirements

Type Requirement

Platform

iOS

8.0+

macOS

10.10

tvOS

9.0

watchOS

2.0

Linux

N/A

IDE

Xcode

9.3+

Language

Swift

4.1+

📲 Installation

CocoaPods

EasyAttributedString is available on CocoaPods.

use_frameworks!
pod 'EasyAttributedString'

Manually

Copy all files in the EasyAttributedString directory into your project.

🛌 Dependency

N/A

❤️ Contribution

You are welcome to fork and submit pull requests.

🔖 License

EasyAttributedString is open-sourced software, licensed under the MIT license.

🔫 Usage

import EasyAttributedString

let style = EAStyle {
	$0.font = EASystemFonts.AmericanTypewriter.font(size: 25)
	$0.color = #colorLiteral(red:0.99, green:0.44, blue:0.29, alpha:1.00)
	$0.underline = (.patternDot, #colorLiteral(red:0.21, green:0.84, blue:0.98, alpha:1.00))
	$0.alignment = .center
}
// et voilà!
let attributedText = "Hello World!".set(style: style)
import EasyAttributedString

let myStyle = EAStyle {
  // define attributes...
}
EAStyleManager.shared.register("SomeStyle", style: style)

let label = UILabel.init()
label.styleName = "SomeStyle"
label.styledText = "Hello, <red>World</red>!"
import EasyAttributedString

let normal = EAStyle {
    $0.font = EASystemFonts.Helvetica_Light.font(size: 15)
}
let red = normal.byAdding {
    $0.color = #colorLiteral(red:0.80, green:0.20, blue:0.20, alpha:1.00)
}

easyattributedstring's People

Contributors

meniny avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.