0

I have an iPad application that is loading a website locally. It works perfectly but the only problem is that I have a link to Facebook that when I click that, the Facebook page will be opened in the application window. Therefore I need to close my running application and reopen it to use it again. How can I open a new Safari window for this purpose?

All files of the website are in application asset folder therefore once user opens the application would see the wesbsite

 <a href="facebook address" target="_blank"><img src="facebook logo"/></a>
Jack
  • 6,430
  • 27
  • 80
  • 151

1 Answers1

0

How to launch safari and open URL from iOS app

This is not my answer but I thought it could help (link to answer above...wasn't allowed to comment):

below is the answer from a member named Tim

Heres what I did:

I created an IBAction in the header .h files as follows:

- (IBAction)openDaleDietrichDotCom:(id)sender;

I added a UIButton on the Settings page containing the text that I want to link to.

I connected the button to IBAction in File Owner appropriately.

Then implement the following:

- (IBAction)openDaleDietrichDotCom:(id)sender
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.daledietrich.com"]];
}
Community
  • 1
  • 1
bio_sprite
  • 438
  • 2
  • 14