UITextView link detection in iOS 7

后端 未结 17 1329
再見小時候
再見小時候 2020-12-01 10:22

I have a UITextView which is managed via Interface Builder. As data detection I have \"Links\" checked. In iOS 6 everything is working fine and links are highli

17条回答
  •  难免孤独
    2020-12-01 10:37

    None of the above worked for me, instead I did this:

    [self.textView setDataDetectorTypes:UIDataDetectorTypeNone];
    [self.textView.setTextColor:[UIColor whiteColor]];
    [self.textView setDataDetectorTypes:UIDataDetectorTypeNone];
    

    I did this with my textview that was supposed to detect all types, and which had non detected color set to white. You can change the code to represent your proper color and link types to detect.

提交回复
热议问题