How to add function-call (not hyperlink) to part of an NSAttributedString in a UILabel?
问题 I need to add some tapGestures to some part of a text, thats in a UILabel. It seems to be able to make a hyperlink - so I guess its possible to make a functioncall as well, but I'm just not sure how to do it. Heres my code: let regularFont = UIFont(name: Constants.robotoRegular, size: 13)! let att1 = [NSFontAttributeName: regularFont] let turqoiseFont = UIFont(name: Constants.robotoBold, size: 13)! let att2 = [NSFontAttributeName: turqoiseFont] let attString1 = NSMutableAttributedString