I have iOS application which supports iOS 6 as well as iOS 7. Now I am showing text in UITextView which contains email address & website urls. In iOS 6 , UITextView detects it correctly but in iOS 7 it doesn't detect when view gets loaded. But when I click on any link , email address it starts detecting all the link / urls.
Is this a bug in iOS 7 or I am missing some settings specially for iOS 7 ? Below are the screenshots of app
1) In iOS 6+ when view loaded
2) In iOS 7 when view loaded
3) In iOS 7 when I tap on any link / email address
4) Here is the settings that I am doing in Interface builder for UITextView.
I checked some links which states that , set
textView.text = nil;
textView.text = @"My required info";
But no luck with above code.
Can any body tell me whats going wrong ? Thanks
This appears to be a bug in iOS 7.0's UITextViews. You should check out NSDataDetector.You can use this to find links, phone numbers and more http://nshipster.com/nsdatadetector/
It appears that the trick is to textView.scrollEnabled = NO
. Seems to fix the problem, although if you need scrolling.
It appears that on 7.1 links are detected when Selectable
but not Editable
.
(IB reports Unsupported Configuration: Data Detection and Editable attributes are mutually exclusive)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With