multi-tab web browsers with UIWebView on iOS

若如初见. 提交于 2019-12-20 05:42:10

问题


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..


回答1:


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.



来源:https://stackoverflow.com/questions/16158531/multi-tab-web-browsers-with-uiwebview-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!