How to enable textview Hyperlink detector in iOS and open Safari


If it is in a UITextView, you just have to enable it:

- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange

also you can open Safari programatically:

@interface MyApplication : UIApplication {



@implementation MyApplication

-(BOOL)openURL:(NSURL *)url{
    if  ([self.delegate openURL:url])
         return YES;
         return [super openURL:url];

Leave a Reply

Your email address will not be published. Required fields are marked *