开发者

Multi view navigation controller within tabs

开发者 https://www.devze.com 2023-01-12 22:56 出处:网络
So I\'m trying to make an app with 3 tabs and one of the tabs has a navigation controller. I have succeeded in making the 3 tabs, and also turning one of them into a navigation controller. The part wh

So I'm trying to make an app with 3 tabs and one of the tabs has a navigation controller. I have succeeded in making the 3 tabs, and also turning one of them into a navigation controller. The part where I'm now stuck is trying to add additional views to the navigation controller tab. Example: Click button 1 on view 1 and it goes to view 2, click button on view 2 and it goes to view 3, etc.

Am I supposed to make a new .xib file for every extra view 开发者_开发技巧that I want, or is there a way to do it with having all the views contained in one .xib file?

Keep in mind, I will have upwards of 20-30 different views in the end.

Also, I am EXTREMELY new to this, as in about a week, so as much detail as possible would be much appreciated.

Thanks.


You should use a seperate xib file for each View, more than one view in a xib is afaik not good practice. But you can create your views programatically if you wish.

Sorry if this isn't very helpful, it might help if you'd outline your program a little further, to see if there was actually need for such an amount of Views or if you could use a dynamic template for some of them.


Echoing Gauloises, you should have one UIViewController subclass + XIB pair for every screen in your app. You can omit the XIB and build the view programmatically if you wish.

However, if you're brand new to iPhone development, I suggest you tackle a slightly less complex project first and/or work through some of the example projects from Apple.

0

精彩评论

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

关注公众号