简体   繁体   中英

uinavigation not working

My navigation controller 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.

在此处输入图片说明

  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM