VOInteractiveLabel

Fill in the blank UILabel with link, hashtag and mention support


License
MIT
Install
pod try VOInteractiveLabel

Documentation

VOInteractiveLabel

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Introduction

VOInteractiveLabel example

Usage

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")
    }
}

Requirements

Installation

VOInteractiveLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "VOInteractiveLabel"

License

VOInteractiveLabel is available under the MIT license. See the LICENSE file for more info.