We are developing an ios application, and it consists of three pages: TOP, MAIN, and DETAIL. We would like to fix the TOP and MAIN pages vertically and only the DETAIL pages horizontally.Is that possible?
ios storyboard
You can override two methods for each UIViewController as follows:
// Return whether to rotate automatically or not
override func shouldAutorotate()->Bool{
return false
}
// Return viewable screen orientation
override func supportedInterfaceOrients() - > Int {
// Horizontal (right)
return Int (UIInterfaceOrientationMask.LandscapeRight.rawValue)
// For vertical fixation, click here.
return Int (UIInterfaceOrientationMask.Portrait.rawValue)
}
© 2024 OneMinuteCode. All rights reserved.