dorian
dorian

Reputation: 13

multi-tab web browsers with UIWebView on iOS

I'm creating a simple web browser. I want my users to add tabs and browse many web pages at the same time, like in Safari, Firefox or Chrome. I've done this and it works great but I don't know if there is a simpler way to do this.

When the user adds a new tab, my application creates a new UIWebView in the background that is related to the new tab and loads a new URL. When the user selects another tab, the UIWebView that is related with this tab appears and the other disappears. Just it..

Upvotes: 1

Views: 2552

Answers (1)

JonahGabriel
JonahGabriel

Reputation: 3094

I would use a UIViewController with the tabs as a parent view controller. Each tab would be associated with a child UIViewController containing a UIWebView. When you click on a different tab or create a new one, you can just hide the current child UIViewController's view and show the new one.

Upvotes: 2

Related Questions