haluzak
haluzak

Reputation: 1143

Objective-C iPhone - Open Multiple URLs in Safari


I know how to open an URL from app in Safari using [[UIApplication sharedApplication] openURL:url];. This is great, but what I need to do is that I have multiple URLs and I want to start Safari with more tabs opened with those URLs.
I tried calling openURL multiple times but it just opens Safari once and other urls are ignored.
Is there any way of opening multiple tabs in Safari from my app?
Thanks.

Upvotes: 1

Views: 1147

Answers (1)

Krumelur
Krumelur

Reputation: 32497

When you call UIApplication openURL:, your application will be put in the background and will no longer be allowed to perform these operations. I do not think that opening multiple tabs is something that iOS Safari supports. Tabs are probably implemented in a more memory-efficient way (i.e. loading only the tab you see, saving a picture of the others until you switch to them). It would help knowing why you want to open multiple tabs.

Some suggestions:

  • Open a link to a "launcher" page, which takes you to the page you want
  • Use UIWebView and implement the tabs yourself
  • Create a menu of some sorts in your app, opening only one page at once

Upvotes: 2

Related Questions