A pure-Swift UILabel replacement with support for attributes, data detectors, and link embedding.
Nantes is a Swift port of the Objective-C library TTTAttributedLabel, serving as a modern UILabel replacement for iOS development. It enables rich text rendering with full NSAttributedString support, automatic data detection for items like URLs and phone numbers, and customizable link handling. The library is designed as a drop-in replacement for UILabel, providing enhanced functionality while maintaining compatibility with iOS's text system.
iOS developers using Swift who need a UILabel replacement with advanced text rendering features, such as styled text, interactive links, and data detection. It is particularly useful for developers building apps that require rich text displays beyond basic UILabel capabilities.
Developers choose Nantes over alternatives because it offers a pure-Swift, modern implementation of TTTAttributedLabel with full compatibility for NSAttributedString and iOS text features. Its unique selling point is providing a drop-in replacement for UILabel with enhanced functionality like link embedding, data detectors, and truncation control, prioritizing ease of use while handling complex text rendering scenarios.
Swift TTTAttributedLabel replacement
Full compatibility with NSAttributedString enables styled text rendering, as supported by the library's attribute handling for custom formatting.
Built-in detectors for URLs, phone numbers, dates, and addresses simplify adding interactive elements, leveraging NSTextCheckingTypes for seamless integration.
Delegate-based pattern for link interactions allows tailored tap responses and appearance control through linkAttributes, as shown in the example code.
Designed as a seamless replacement for UILabel while enhancing functionality, maintaining compatibility with iOS's text system for easy adoption.
Limited to UIKit-based apps, requiring additional bridging for SwiftUI integration, which complicates modern iOS development workflows.
Adds a dependency managed via Carthage or CocoaPods, increasing project complexity and maintenance compared to native UILabel usage.
The README provides basic examples but lacks comprehensive API documentation, potentially slowing down development for advanced use cases.
Nantes is an open-source alternative to the following products:
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.
G..lit...c...hing UILa..bel fo..r iO...S :tv:
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.