To run the example project, clone the repo, and run pod install from the Example directory first.
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 is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "VOInteractiveLabel"- Additional documentation
- Add documentation and screenshots
- Initial beta release
VOInteractiveLabel is available under the MIT license. See the LICENSE file for more info.