Pages

Thursday 2 April 2015

How to launch safari and open URL in iOS

Heres is steps: 
  1. I created an IBAction in the header .h files as follows:
    - (IBAction)Link_btnCliecked:(id)sender
    I added a UIButton on the Settings page containing the text that I want to link to.
  2. I connected the button to IBaction in File Owner appropriately.
  3. Then implement the following:
    - (IBAction)Link_btnCliecked:(id)sender
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://yogapoint.com"]];
    }