Xiangping Meng
Xiangping Meng

Reputation: 160

In iOS 7, why view height different from the same view in iOS 6

I have an view controller which is the root view controller of a UINavigationController, and the UINavigationController is the controller of a UITabBarViewController

like this structure:

UITabBarViewController->UINavigationViewController->UIViewController

But the problem is, when I use self.view.frame.size.height property of this view controller, I get different result.

In iOS 6, I get 548. But in iOS 7, I get 568. So I can place my custom subview accurately because its position based the height of the view.

Upvotes: 1

Views: 2873

Answers (1)

Daniel Broad
Daniel Broad

Reputation: 2522

iOS7 views go under the navigation bar, you can stop your views going under the navigation bar in your viewController:

self.edgesForExtendedLayout = UIRectEdgeNone;

Upvotes: 6

Related Questions