I have iPad application which uses iOS7 SDK with auto-layout. my main view have a sub view which is a UITabBarController which programmatically creates it's view controller's (storyboard.instaniateViewController..).
Inside the views - when i'm in portrait mode - everything is fine. but when i move to landscape mode - the view's width is changed correctly, but the view's height remains as in Portrait mode. The result is that my screen is truncated in a height.
Any ideas why it happens? constrains seems fine. I can change it by programmatically change the vie's frame, but it doesn't seem right.
Thanks
OK, i see what the problem was - somewhere up the view's hierarchy was defined:
[viewController.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth]
and that meant that the height was not flexible of course. the fix is easy once i saw it:
[viewController.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]
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.