- August 20, 2025
- Mins Read
A TextView that provides easy to use tagging feature for Mention or Hashtag.
Tagging is a UIView that encloses a TextView that contains an algorithm for tagging. If you’re worried about implementing Mention
or Hashtag
in your app, you can easily implement them using the library.
Add Tagging
to the view as a subview.
Set the list that you want to tag and tag symbol to Tagging
.
tagging.symbol = “#”
tagging.tagableList = [“DOOMFIST”, “GENJI”, “MCCREE”, “PHARAH”, “REAPER”, “SOLDIER:76”, “SOMBRA”, “TRACER”, “BASTION”, “HANZO”, “JUNKRAT”, “MEI”, “TORBJORN”, “WIDOWMAKER”, “D.VA”, “ORISA”, “REINHARDT”, “ROADHOG”, “WINSTON”, “ZARYA”, “ANA”, “BRIGITTE”, “LUCIO”, “MERCY”, “MOIRA”, “SYMMETRA”, “ZENYATTA”]
Tagging
.
tagging.dataSource = self
TaggingDataSource
.
func tagging(_ tagging: Tagging, didChangedTagableList tagableList: [String]) {
matchedList = tagableList
}
func tagging(_ tagging: Tagging, didChangedTaggedList taggedList: [TaggingModel]) {
self.taggedList = taggedList
}
Property | Type | Description |
---|---|---|
cornerRadius |
CGFloat |
Corner radius |
borderWidth |
CGFloat |
Border width |
borderColor |
CGColor |
Border color |
textInset |
UIEdgeInsets |
Text inset |
backgroundColor |
UIColor |
Background color |
symbol |
String |
Tagging symbol |
tagableList |
[String] |
Tagable list |
defaultAttributes |
[NSAttributedStringKey: Any] |
Default attributes for all range attributedText of Textview |
symbolAttributes |
[NSAttributedStringKey: Any] |
Aattributes for symbol text |
taggedAttributes |
[NSAttributedStringKey: Any] |
Attributes for tagged text |
platform :ios, ‘8.0’
use_frameworks!
target ‘<Your Target Name>’ do
pod ‘Tagging’
end
github “k-lpmg/Tagging”
Format phone numbers as they're typed—entirely in SwiftUI. 📱 Get Started | Examples | Customize | Features | Install | Pricing And it's as easy as
CurrencyText provides lightweight libraries for formating text field text as currency, available for both UIKit and SwiftUI. Its main core, the CurrencyFormatter class, can also ...
SlidingTabView is a simple Android-Like tab view that is built using the latest and greatest SwiftUI. Almost everything is customizable! Installation ...
A SwiftUI UITabBarController implementation that retains state between tab changes. Big thanks to Amzd and everyone who helped to refine this gist as it ...