 
 import UIKit
 
-class ViewController: UIViewController {
+class ViewController: UIViewController, LinkLabelInteractionDelegate {
 
     override func viewDidLoad() {
         super.viewDidLoad()

        // Dispose of any resources that can be recreated.
    }


}


        attributedString.addAttribute(NSForegroundColorAttributeName, value: UIColor.blackColor(), range: fullRange)
        attributedString.addAttribute(NSLinkAttributeName, value: NSURL(string: "https://google.com")!, range: linkRange)
        
        let linkTextAttributes = [
            NSUnderlineStyleAttributeName: NSNumber(integer: NSUnderlineStyle.StyleSingle.rawValue),
            NSForegroundColorAttributeName: UIColor.greenColor()
        ]
        
        let highlightedLinkTextAttributes = [
            NSUnderlineStyleAttributeName: NSNumber(integer: NSUnderlineStyle.StyleSingle.rawValue),
            NSForegroundColorAttributeName: UIColor.redColor()
        ]
        
        let label = LinkLabel()
        label.numberOfLines = 0 // Infinite lines
        label.attributedText = attributedString
        label.linkTextAttributes = linkTextAttributes
        label.highlightedLinkTextAttributes = highlightedLinkTextAttributes
        label.interactionDelegate = self
        label.frame = CGRect(x: 20, y: 20, width: 280, height: 400)
        self.view.addSubview(label)
    }
