Hello,
I've categorized UIApplication so I can load a UIWebView when a click on links inside a UITextView. Here it is:
Everything works flawlessly (UIWebView-wise) but now, when I want to launch the telephone app (which is opened via the same method) nothing happens. Here's the code:
How can I change openURL so that both cases work ok?
Thanks
I've categorized UIApplication so I can load a UIWebView when a click on links inside a UITextView. Here it is:
Code:
@implementation UIApplication (UIApplicationCategory)
- (BOOL)openURL:(NSURL*)url {
if ([[url absoluteString] rangeOfString:@"tel://"].length==0) {
[[self delegate] loadReviewsBrowser:url];
return NO;
}
return YES;
}
@end
Everything works flawlessly (UIWebView-wise) but now, when I want to launch the telephone app (which is opened via the same method) nothing happens. Here's the code:
Code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://XXXXXXXXX"]];
How can I change openURL so that both cases work ok?
Thanks