CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Radoslav Stankov.
A UILabel subclass, that adds highlighting support to labels. Supporting hashtags, mentions, urls and having the ability to recognize custom texts. Written in Swift.
use_frameworks!
pod 'RDSActionLabel'
let label = RDSActionLabel()
label.text = "Comment containing several #hash-1 #hash-2 from @username linking to http://example.com"
label.matchUsername(color: mentionColor, selectedColor: mentionSelectedColor) { self.selectUser($0) }
label.matchHashtag(color: hashtagColor, selectedColor: hashtagSelectedColor) { self.selectHash($0) }
label.matchUrl(color: URLColor, selectedColor: URLSelectedColor) { self.selectUrl($0) }
let label = RDSActionLabel()
label.match("custom regular expression", color: color, selectedColor: selectedColor) { self.handle($0) }
#import "RDSActionLabel-Swift.h"
RDSActionLabel *label = [RDSActionLabel new]
// you can pass `nil` for using the default values
[self.legalLabel matchUrlWithColor:urlColor selectedColor:selectedUrlColor handle:^(NSString * _Nonnull urlString) {
[self handleUrl:urlString];
}];
gem install scan
./bin/test
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)