In the View Controller, I set the navigation bar so that

self.navigationController.navigationBar.hidden = YES;

However, I am running into the issue that whichever way my UIViews are laid out in Storyboard, all the UIViews at runtime are moved down 64px. Is there a way that I could set so that both the NavBar is hidden, and that it does not affect how the UIViews are laid out on screen?

Thanks!

有帮助吗?

解决方案

Usually , I use this to hide navigationBar.

[self.navigationController setNavigationBarHidden:YES];

While,

self.navigationController.navigationBar.hidden = YES; 

Is the property for UIView, this is a method for UINavigationController.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top