why is my view still presented in landscape?

后端 未结 1 1405
慢半拍i
慢半拍i 2021-01-25 23:46

my view is controlled by a navigation controller, so I set the supported orientations in to the navigation controller to explicitly portrait & portraitUpSideDown and this wo

相关标签:
1条回答
  • 2021-01-26 00:04

    You can change your orientation back to portrait before dismissing it:

    UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
    
    dismiss(animated: true) { _ in
        print("dismissed in Portrait mode")
    }
    
    0 讨论(0)
提交回复
热议问题