Should I make UIWebViews for every tab or should they share one and the tab selection just changes the URL?
What’s better?
If the later, how do I do that?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer really depends on whether you want the ability to go back and forth easily. For example, if on tab A I have webPage1 and on tab B I have webPage2, as a user when I go back to tab A I don’t really expect to have to reload the page. So, I would suggest a separate webView for each tab in order to maintain separate content. There is very little overhead in maintaining a couple web views, anyway.
This can also be done without UITabBarController, using a UIPageControl along the bottom of a normal UIViewController. You can make it a little taller and the user can touch on it to navigate. This is important since once UIWebView loads it will grab left and right swipes, making it difficult to swipe left/right to change views. A nice advantage here is that the user can add another webview (if you allow it) and the UIPageControl will support it more smoothly than will a UITabBarController.
Another option is the UIPageViewController, which I haven’t yet used but looks similar to what you describe.
Good luck,
Damien