开发者

uinavigation not working

My navigation contr开发者_如何学编程oller not working.

I take a tabbar-based application now from app delegate. I want to add a navigationcontroller but it's not working.

[window addSubview:navigationController.view];

I simply make an object of uinavigation controller and synthesize it.


Actually you don't need to add navigation Controller's view in the window, if you want to add a navigation controller in tabbar controller application.

See the below screen shot, you just need to select the tabbarcontroller in the IB and then from inspector window you can select class or particular tab item. Just make then navigation controller.

uinavigation not working


  • Open MainWindow.xib.
  • Under TabBarController you will see two view controllers.
  • Delete both of the view controllers.
  • Now, from the library add two navigation controllers under TabBatController.
  • Now, open the inspector of the navigation controller and set its nib name and the class name.

i think this will solve your problem.


You can also go through http://21gingerman.wordpress.com/2009/04/06/tutorial-and-sample-code-for-iphone-app-with-tab-bar-and-nav-bar/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜