测试已测试 | ✓ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2016年12月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✗ |
由 Radoslav Stankov 维护。
一个UILabel子类,为标签提供突出显示支持。支持标签、提及其它,并具有识别自定义文本的能力。使用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 '添加一些功能'
)git push origin my-new-feature
)