TabBarController switch views in TabBarItem

二次信任 提交于 2019-12-13 03:24:25

问题


I have a app based off the default xcode "Tab Bar Application" template. It has 3 tabBar Items that each load their own xib FirstView.xib, SecondView.xib, and ThirdView.xib. What i would like is a UIButton on the FirstView.xib that loads the FirstAltView.xib where the FirstView.xib is. Can someone please post some sample code on how to do this or a complete xCode project because i cannot figure out how to link the view controllers together.

Here is a flow chart of how the flow of my app should be. Basicly there is a button on the login window that will load the table view. alt text http://i51.photobucket.com/albums/f373/ROBKID/flowchart.png


回答1:


What you are asking for is well-documented with sample code all over the interwebs. Just remember that you cannot push a tab bar controller onto a navigation controller stack. You can, however, use a navigation controller as a tab bar view controller.

I would start with the Apple documentation on programming view controllers.

Best regards,




回答2:


If anyone else is trying to figure out how to build a simular structure to this app i highly recommend http://www.stanford.edu/class/cs193p/cgi-bin/drupal/node/47 its standford Universities iphone development class and that lesson was very helpful in explaining this concept to me.



来源:https://stackoverflow.com/questions/2134038/tabbarcontroller-switch-views-in-tabbaritem

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