测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可协议 | MIT |
发布最新发布 | 2017年9月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Val Osipenko维护。
要运行示例项目,克隆仓库,然后先从 Example 目录运行 pod install
import VOInteractive
class ViewController: UIViewController, VOInteractiveLabelDelegate {
override func viewDidLoad() {
super.viewDidLoad()
myLabel = FillInBlankLabel3()
myLabel.delegate = self
myLabel.text = "My name is enter name here"
myLabel.blankArray.append(FillInBlankModel1(type: .string,
text: "enter name here",
hint: "Please enter your name",
placeholder: "Name",
attributes: [NSForegroundColorAttributeName: UIColor.black,
NSUnderlineColorAttributeName: UIColor.black,
NSUnderlineStyleAttributeName: NSUnderlineStyle.styleSingle.rawValue]))
self.view.addSubview(myLabel)
myLabel.setupLabelAttributes()
}
// MARK: - VOInteractiveLabel
func clickedOnLinkAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
print("Clicked on link")
}
func clickedOnBlankAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
print("Clicked on blank")
}
func clickedOnHashtagAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
print("Clicked on hashtag")
}
func clickedOnMentionAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
print("Clicked on mention")
}
}
iOS 7+
VOInteractiveLabel 通过 CocoaPods 提供支持。要安装它,只需将以下行添加到您的 Podfile 中
pod "VOInteractiveLabel"
VOInteractiveLabel 依据 MIT 许可协议发布。有关更多信息,请参阅 LICENSE 文件。