As title, I'm wondering if it's possible to lock orientation programmatically in iOS 9 now? This is critical to my app but I can't find a way to do it. Thanks.
Use supportedInterfaceOrientations and preferredInterfaceOrientationForPresentation used to manage orientation for example
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return UIInterfaceOrientationPortrait;
}