forked from AliSoftware/OHAttributedLabel
UILabel that supports NSAttributedString
License
xuzhe/OHAttributedLabel
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This class allows you to use a UILabel with NSAttributedStrings, in order to display styled text with mixed style (mixed fonts, color, size, ...) in a unique label. This class is a subclass of UILabel, which adds an "attributedText" property. Use this property, instead of the "text" property, to set and get the NSAttributedString to display. In addition, these header and source files also contain a category of NS(Mutable)AttributedString to facilitate creation and manipulation of common attributes of NSAttributedString (to easily change the font, style, color, ... of a range of the string). See the header file (OHAttributedString.h) for a list of those comodity methods. Finally, the textAlignment property (herited from UILabel) accepts the new value "UITextAlignmentJustify" (that actually match the kCTJustifiedTextAlignment constant) to justify the text in addition to being able to align it left, centered or right. See the "SampleCode.m" file for an example / extract of code
About
UILabel that supports NSAttributedString
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published