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
  • Loading branch information
vijaysingh-axway committed Dec 11, 2020
1 parent 1168ef8 commit 39f1848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiViewController.m
Original file line number Diff line number Diff line change
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 39f1848

Please sign in to comment.