Skip to content

Subclass of UILabel to modify character spacing and line spacing to your label

License

Notifications You must be signed in to change notification settings

keepworks/KWTextStyleLabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KWTextStyleLabel

Build Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod "KWTextStyleLabel"

How to use

Add the class KWTextStyleLabel to label on storyboard

Adding KWTextStyleLabel

Modifying character spacing and line spacing using storyboard

Modify in storyboard

Or modifying character spacing and line spacing programmatically

import KWTextStyleLabel

@IBOutlet weak var label: KWTextStyleLabel!

label.characterSpacing = 3
label.lineGap = 10
label.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry."

Can create label with KWTextStyleLabel initializer

let label = KWTextStyleLabel(characterSpacing: 5, lineGap: 25, text: "Lorem Ipsum")
label.frame = CGRect(x: 8, y: 0, width: 296, height: 122)
view.addSubview(label)

KWTextStyleLabel initializer have 3 different optional parameters

KWTextStyleLabel()
KWTextStyleLabel(characterSpacing: <CGFloat>)
KWTextStyleLabel(lineGap: <CGFloat>)
KWTextStyleLabel(text: <String>)
KWTextStyleLabel(characterSpacing: <CGFloat>, lineGap: <CGFloat>)
KWTextStyleLabel(lineGap: <CGFloat>, text: <String>)
KWTextStyleLabel(characterSpacing: <CGFloat>, text: <String>)

Author

KeepWorks, ios@keepworks.com

Credits

KWTextStyleLabel is owned and maintained by the KeepWorks.

N|Solid

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/keepworks/KWTextStyleLabel.

License

KWTextStyleLabel is available under the MIT License. See the License file for more info.

About

Subclass of UILabel to modify character spacing and line spacing to your label

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •