How To Open url in Safari From App : iOS 6

How To Open url in Safari From App / launch safari from iphone app

This tutorial will help you to learn about Open url in Safari From App. To Open url in safari in IOS 6 we are using openURL concept. This openURL method is a very powerful  UIApplication functionality provided by iOS 6. This openURL concept is used to call the phone number from the application, send sms from the application, open an application installed in the phone, and also it will help to do many other things ..

 

Code Snippet for open url in safari from app

[box type=”shadow”]

-(IBAction)OpenLink:(id)sender {
NSString* launchUrl = @"http://www.mobile.safilsunny.com/open-url-safari-ios-6/";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];
}

[/box]

Reference

[box type=”shadow”]

[/box]

6 Comments

  1. Aalok Parikh December 28, 2012
    • Kashban September 10, 2013
  2. Aalok Parikh December 28, 2012
    • Germoe k January 9, 2013
  3. SrX January 4, 2013

Leave a Reply

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