के साथ काम नहीं कर रहा है I UTableViewCell के लेबल में टेक्स्ट के लिंक का पता लगाने के लिए TTTAttributedLabel का उपयोग करना चाहता हूं, लेकिन यह काम नहीं करता है। मैं आईओएस 8 के साथ तेजी से उपयोग कर रहा हूँ।TTTAttributedLabel लिंक IIS8 में तेजी से
class StoryTableViewCell: UITableViewCell, TTTAttributedLabelDelegate {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
// Link properties
let textLabel = self.descriptionLabel
let linkColor = UIColor(red: 0.203, green: 0.329, blue: 0.835, alpha: 1)
let linkActiveColor = UIColor.blackColor()
if (textLabel is TTTAttributedLabel) {
var label = textLabel as TTTAttributedLabel
label.linkAttributes = [NSForegroundColorAttributeName : linkColor]
label.activeLinkAttributes = [NSForegroundColorAttributeName : linkActiveColor]
label.enabledTextCheckingTypes = NSTextCheckingType.Link.toRaw()
label.delegate = self
}
}
}
जांचें: http://stackoverflow.com/a/22395136/1106035 –
@ प्रिंस यह काम नहीं कर रहा है – JeremyWei