質問

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