i try to open link that tapped in app, like this:
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)url inRange:(NSRange)characterRange
{
UIApplication *myApp = [UIApplication sharedApplication];
[myApp openURL:url];
return YES;
}
But in result, nothing happens.
Just: Could not find any actions for URL applewebdata://10FC0C33-238E-481E-BF44-8D0BA2B1FBB7/%22https://vk.com/feed/%22 without any result.
I had this exact error. The problem was that I declared the delegate method
public func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool {
in a (Swift) extension of the (Objective-C) class, but the class header had the protocol conformance declaration.
It all worked once I moved the UITextFieldDelegate declaration to the extension, where the delegate method was
extension MyViewController: UITextViewDelegate
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