I am making an application which implements the following structure :
MainWindow
|_ tabBar Controller
|_ FirstView
|_ SecondView
|_ ThirdView
|_ FourthView
|_ navigation Controller
|_ ViewA
|_ ViewB
Following a tutorial, I have the tabBa开发者_运维百科r controller and switch between views (1, 2, 3) working properly, the code I need is executed for each display of those views 1, 2, 3.
Now I want to make it more complex and load a view that is just a Navigation Controller, becasuse my 4th item content is like a Blog (List of articles, when you click on one, it will show the summary)
The code for the navigation controller and 2 views works well in a separate project where the navigation Controller is in the MainWindow nib. Now that I want to move it in the FourthView, I have the following error on execution :
2010-10-03 00:26:45.248 Scaning[1037:307] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "FourthView" nib but the view outlet was not set.'
I understand this is a problem in Interface Builder where I need to associate a view outlet, but I am new at iPhone development and can't figure out why the behaviour is different if the navigation Controller is not on the main window.
Do you know any sample app that implements both tabbar controller and navigation controllers that I could analyze? Otherwise, any advice for that?
Thanks !
i found it... Just need to manage this directly in the tabBar Controller where we can choose the Class of each Tab...
精彩评论