I am not able to open the NSURL inside the UITextView with Accessibility turned ON.(Working fine when turned OFF)
I have attributed text inside the UITextView that contains some string and some NSURLs.
Please note I have used attributed string as I need the URLs to be underlined and shown as string only, so that when the user clicks on that underlined string, the link is opened in the browser.
Please let me know if more clarification is required.
P.S. I had already used UITapGesture but didnt succeed.
CGPoint tapLocation = [tapGesture locationOfTouch:0 inView:textView];
UITextPosition *textPosition = [textView closestPositionToPoint:tapLocation];
NSDictionary *attributes = [textView textStylingAtPosition:textPosition inDirection:UITextStorageDirectionForward];
NSURL *url = attributes[NSLinkAttributeName];
This textPosition is not correct when Accessibility is ON.
Thanks