A drop-in replacement for UILabel that supports attributed strings, automatic data detection, and manual link embedding.
TTTAttributedLabel is an open-source iOS library that replaces the standard UILabel with enhanced support for attributed strings, automatic data detection, and interactive links. It solves the limitations of UILabel by providing advanced typographic controls, link embedding, and accessibility features while maintaining high performance.
iOS and tvOS developers building apps that require rich text rendering, interactive links, or complex text layouts, particularly those who need more control than UILabel offers.
Developers choose TTTAttributedLabel because it's a performant, drop-in replacement for UILabel with unique features like automatic data detection, manual link embedding, and advanced paragraph styling, all while maintaining full compatibility with NSAttributedString.
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Identifies URLs, phone numbers, dates, and more using NSTextCheckingTypes, saving developers from manual regex parsing or complex implementations.
Offers properties like firstLineIndent, lineSpacing, and verticalAlignment for precise typographic adjustments, exceeding UILabel's basic capabilities.
Supports both tap and long-press gestures on links with custom styling, improving user interaction compared to standard UILabel link handling.
Designed as a drop-in substitute for UILabel, allowing easy integration into existing projects while inheriting base label attributes for attributed strings.
When used as a static library, IBDesignable annotations fail, causing warnings and reduced design-time previews in Xcode, as noted in the README workarounds.
For custom font attributes, developers must use low-level Core Text C APIs, requiring bridging and manual memory management in Objective-C or Swift code.
The library and documentation are primarily in Objective-C, which may pose integration challenges or a learning curve for Swift-focused developers.