★ wanayoo — archive 1999 https://github.com/Meniny/EasyAttributedStringNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.adoc

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

10.2+

Language

Swift

5+

📲 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)
}

About

✏️ Make AttributedString much more easier.

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.