VOInteractiveLabel 0.0.3

VOInteractiveLabel 0.0.3

测试已测试
语言语言 SwiftSwift
许可协议 MIT
发布最新发布2017年9月
SwiftSwift 版本3.0
SPM支持 SPM

Val Osipenko维护。



  • 作者
  • valosip

VOInteractiveLabel

示例

要运行示例项目,克隆仓库,然后先从 Example 目录运行 pod install

介绍

VOInteractiveLabel example

使用方法

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"

变更日志

0.0.3

  • 其他文档

0.0.2

  • 添加文档和截图

0.0.1

  • 初始测试版发布

许可协议

VOInteractiveLabel 依据 MIT 许可协议发布。有关更多信息,请参阅 LICENSE 文件。