Home Ask Login Register

Developers Planet

Your answer is one click away!

angeldev February 2016

supportedInterfaceOrientations not called in iPad

I have a UITabBarController subclass and it has the below code:

class TabBarController: UITabBarController {

// MARK: Methods

override func viewDidLoad() {



override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {

    if self.selectedIndex == 1 {
        return .Portrait

    return .All



The function supportedInterfaceOrientations is only called when I execute the app from an iphone. If I execute the app from my iPad mini it is not called. Any idea of the reason of this behaviour?


angeldev February 2016

It is very strange, but if I deselect Upside Down from the device orientation for iPads supportedInterfaceOrientations is called.

enter image description here


If 'Requires full screen' setting from 'General' is enable, will allow the orientation delegate methods shouldAutorotate, preferredInterfaceOrientation, and supportedInterfaceOrientations to fire.

Post Status

Asked in February 2016
Viewed 1,863 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life