Force portrait when launching the avatar builder

This commit is contained in:
Nora Trapp 2021-07-16 14:22:30 -07:00
parent 86af7119d8
commit cd11ed36d7

View File

@ -50,6 +50,12 @@ class AvatarSettingsViewController: OWSTableViewController2 {
self.avatarChangeCallback = avatarChangeCallback
super.init()
createTopHeader()
// We only support portrait on non-iPad devices, but if we're
// already in landscape we need to force the device to rotate.
// TODO: There might be a better spot to do this, but generally
// this should never be initialized unless about to be shown.
if !UIDevice.current.isIPad { UIDevice.current.ows_setOrientation(.portrait) }
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {