UITextViews in a UITableView link detection bug in iOS 7

后端 未结 13 721
醉梦人生
醉梦人生 2020-12-01 07:19

I have custom UITableViewCells that contain a UITextView. I have link detection in the UITextView turned on in Interface Builder. When I first load the table view, everythin

相关标签:
13条回答
  • 2020-12-01 08:10

    None of these answers worked for me (iOS8, Swift), the only thing that worked for me was to first set the text to nil and then prepend the new text with a non-visibile whitespace unicode character (I chose \u200B, which is the ZERO WIDTH SPACE character but any character works):

    textView.text = nil
    textView.text = "​\u{200B}\(newText)"
    
    0 讨论(0)
提交回复
热议问题