UILabel drop-in replacement supporting Hashtags (#), Mentions (@), URLs (http://), Emails, written in Swift
- Swift 5.0 (1.1.0+) and 4.2 (1.0.1)
- Default support for Hashtags, Mentions, Links, Emails, custom Emoji
- Ability to trim urls
- Super easy to use and lightweight
- Works as
UILabel
drop-in replacement - Design for works with twitter-text and Mastodon status content
Add package path: https://github.com/TwidereProject/ActiveLabel.swift
to your Xcode - Project - Swift Packages settings
You can find the demo App here.
Before writing ActiveLabel
we've tried a lot of the following alternatives but weren't quite satisfied with the quality level or ease of usage, so we decided to contribute our own solution.
- TTTAttributedLabel (ObjC) - A drop-in replacement for UILabel that supports attributes, data detectors, links, and more
- STTweetLabel (ObjC) - A UILabel with #hashtag @handle and links tappable
- AMAttributedHighlightLabel (ObjC) - A UILabel subclass with mention/hashtag/link highlighting
- KILabel (ObjC) - A simple to use drop in replacement for UILabel for iOS 7 and above that highlights links such as URLs, twitter style usernames and hashtags and makes them touchable