Tagging
A TextView that provides easy to use tagging feature for Mention or Hashtag.
Introduction
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.
Getting Started
-
Add
Tagging
to the view as a subview. -
Set the list that you want to tag and tag symbol to
Tagging
.
- Implement TaggingDataSource on the class that added the
Tagging
.
- Get tagable list and tagged list through
TaggingDataSource
.
Usage
Tagging Property
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 |
Installation
CocoaPods (iOS 8+)
Carthage (iOS 8+)
LICENSE
These works are available under the MIT license. See the LICENSE file
for more info.