Skip to content

Commit

Permalink
fix(ios): use supportedInterfaceOrientations of UINavigationControlle…
Browse files Browse the repository at this point in the history
…r.topViewController instead of UINavigationController (#12458)

Fixes TIMOB-28282
  • Loading branch information
vijaysingh-axway committed Feb 10, 2021
1 parent 404e6be commit 1f1127a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiViewController.m
Expand Up @@ -104,8 +104,11 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations
If we are in a navigation controller, let us match so it doesn't get freaked
out in when pushing/popping. We are going to force orientation anyways.
*/
if ([self navigationController] != nil) {
return [[self navigationController] supportedInterfaceOrientations];
/*
TIMOB-28282. Shouldn't UINavigationController.topViewController decide the supported orientation?
*/
if ([self navigationController] != nil && [[self navigationController] topViewController] != self) {
return [[[self navigationController] topViewController] supportedInterfaceOrientations];
}
//This would be for modal.
return (UIInterfaceOrientationMask)_supportedOrientations;
Expand Down

0 comments on commit 1f1127a

Please sign in to comment.