I want my subclass of MSMessagesAppViewController to be portrait-only, is there a way to lock the orientation?
My plist contains
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
And I tried overriding
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .portrait
}
But I am still able to rotate the device and see my layout in landscape. I suppose this is related to the fact that iMessage apps are extensions, is that right? Is there a way?
Yes, it's a requirement to support both landscape and portrait - I asked this a month ago and Apple support replied that we must follow the constraints and behaviors of iMesage.
Make sure that you put everything in a scrollview that scroll properly based on orientation - reason for scrollview so that it will support anything that might be off screen in smaller device visible area in different orientations.