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];

How to hide/unhide label, textfield and disable button in Objective-C


Here is the answer for hiding:

[self.label1 setHidden:TRUE];

and here is the answer for disabling:

[self.btnOutlet setEnabled:FALSE];