views:

345

answers:

1

Hi!

I've a noobish question. How does tabbed browsing work? I mean that you save the current webView with it's content in an array and show it later.

like you can read here http://www.iphonedevsdk.com/forum/iphone-sdk-development/24521-please-need-help-webview.html I made few attempts but no luck so far.

as anyone a nice suggestion? Thanks in advance

A: 

Implementing a tabbed web browser is more of a design challenge than a pure programming challenge. You need to consider how the user will switch between different tabs. From a data structure perspective, you can store multiple instances of UIWebView in an array, as you mention.

From a design perspective, you should look at the way Apple implements their web browser. Their approach seems to be more of a multiple window system than a multiple tab system.

One thing to keep in mind, UIWebView's use a lot of RAM, so be careful keeping too many stored in memory.

PS: if you are interested in checking out a tutorial on UIWebView check out this tutorial

zPesk
thanks for your help. I've already build a big part of the browser (even a download function etc.) but I can't manage loading an UIWebView from an array. what I tried so far is:[mainDrowser.webView removeFromSuperview];mainDrowser.webView = [mainDrowser.arrayForTest objectAtIndex:anIndex];[mainDrowser.view addSubview:mainDrowser.webView];but it didn't work. the webView would reappear but not with the the content I want, instead with the content that was in it when I removed it from Superview.
Yllier