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.
Just create new classes as a subclass of Navigation Controller
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 ofUINavigationController
).
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.
精彩评论