2017-03-09 10:50:12 +00:00
|
|
|
/*
|
2024-09-25 10:24:52 +00:00
|
|
|
Copyright 2024 New Vector Ltd.
|
|
|
|
Copyright 2017 Vector Creations Ltd
|
|
|
|
Copyright 2016 OpenMarket Ltd
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
Please see LICENSE in the repository root for full details.
|
2017-03-09 10:50:12 +00:00
|
|
|
*/
|
|
|
|
|
2017-03-09 10:59:22 +00:00
|
|
|
#import "UINavigationController+Riot.h"
|
2017-03-09 10:50:12 +00:00
|
|
|
|
2017-03-09 10:59:22 +00:00
|
|
|
@implementation UINavigationController (Riot)
|
2017-03-09 10:50:12 +00:00
|
|
|
|
|
|
|
- (BOOL)shouldAutorotate
|
|
|
|
{
|
|
|
|
if (self.topViewController)
|
|
|
|
{
|
|
|
|
return [self.topViewController shouldAutorotate];
|
|
|
|
}
|
|
|
|
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
|
|
|
|
{
|
|
|
|
if (self.topViewController)
|
|
|
|
{
|
|
|
|
return [self.topViewController supportedInterfaceOrientations];
|
|
|
|
}
|
|
|
|
|
|
|
|
return UIInterfaceOrientationMaskAll;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
|
|
|
|
{
|
|
|
|
if (self.topViewController)
|
|
|
|
{
|
|
|
|
return [self.topViewController preferredInterfaceOrientationForPresentation];
|
|
|
|
}
|
|
|
|
|
2020-08-12 14:41:54 +00:00
|
|
|
return UIInterfaceOrientationPortrait;
|
2017-03-09 10:50:12 +00:00
|
|
|
}
|
|
|
|
|
2017-03-09 10:59:22 +00:00
|
|
|
@end
|