开发者

tab bar in a view based application

I am building a view based application in xcode, and i am new to all the coding and stuff doing it now for 2 weeks. everything went great until i wanted to add a tab bar to by project. I have searched the interwebz for this for a long time, but all that i could find was people explaining how you can add a tabbar to a window based application, Or how to build a tab bar with a tab bar application. Can someone please help me. And there is one more thing, i don开发者_高级运维't want to add the tabbar to the first view. I have an application with some buttons, who take you to different views, and i want to add the tabbar to the fift view, so i can not build it in the app delegate i think.

I hope this explains my problem and i sure hope someone could help me.

thanks.


Start with a UITabBarController. WHen you use it in Interface builder you can add UITabBarItems (the items to select). You can link each TabBarItem to a certain NIB. Make your NIBs for every view you want to show. Set every TabBarItem class to the correct controller of your NIB files, these will be used as the file owner of that NIB.

So: -Make a Main NIB -Make NIBs for every controller and make the views. -Make the controllers and link the controllers to the NIB. -Implement the code.

Switching UITabBarItems will make automatically change the Controllers.

Here is a tutorial for this implementation: Tutorial

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜