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;
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With