开发者

Navigation Controller does not show up in TableView

开发者 https://www.devze.com 2023-01-24 12:12 出处:网络
I have 3 Views in my app: Test, Summary and Details 开发者_如何学PythonI have a Tab Bar which shows Summary Table View. Clicking Table View shows Details view.

I have 3 Views in my app: Test, Summary and Details

开发者_如何学PythonI have a Tab Bar which shows Summary Table View. Clicking Table View shows Details view.

Now, on test page, at the end, I am showing Summary Table view. But doing so, navigation bar does not show up. It shows when I go to Summary page by clicking Tab Bar, but not from Quiz page.

I am using below code to display Summary TableView from Quiz view:

[self.navigationController pushviewController:Summary animated:YES];

It shows Table View fine, but no Navigation Bar.

How do I show Navigation bar?

I have tried added it thru XIB but it wont show.

Thanks!


You should add this line of code to your viewDidLoad method:

[self.navigationController setNavigationBarHidden:NO animated:YES];

This will unhide the navigation bar.

0

精彩评论

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