jazzedge
11/26/2017 - 7:45 AM

Swift - Set auto-rotation in code

    override var shouldAutorotate: Bool {
        return self.traitCollection.userInterfaceIdiom == .pad
    }
    
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return .allButUpsideDown
    }