简体   繁体   中英

Upside down - iOS Xcode not working while using autolayout

using autolayout feature in xcode 6.3.2 , i am able to adjust my views, buttons and text fields for iPad and iPhone. but for upside down my view doesnt chagne, Any idea How do we support upside down mode using auto layout without adding any code to your view controllers. I have also checked the upside down mode in project settings in xcode.

sample code :- https://github.com/deepesh259nitk/OrientationSupport

screen shots below.

在此处输入图片说明

在此处输入图片说明

max.

You also need to override -supportedInterfaceOrientations inside each view controller you want to support upside down orientation, since by default that method returns UIInterfaceOrientationMaskAllButUpsideDown on iPhone.

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM