开发者

adding nav controllor to tabbar controllor iPhone

I have a tabbar controllor and trying to add navigation to each control. In xcode 3 i was able to change the controllor to nav controllor in开发者_如何学编程 attribute inspection. How do we do that in xcode 4?


There are a couple of ways to do this. You can either do it in the IB or just allocate a view controller for specific tabs. na. Just do these.

  1. Just create new classes as a subclass of Navigation Controller

  2. Go to the specific tabs in the IB, and assign their class as the respective class for it's view. For example. For Tab 1, click tab1 and select the class as MyNavigationController (which should be a subclass of UINavigationController).


I just had to drag and drop the navigation controller to the tabbar controllor to get the navigation supported tab. Then set the appropriate view controller class.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜