Skip to content

Commit

Permalink
iOS: fixing orientation event firing too soon on iOS 16 (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova authored Sep 21, 2022
1 parent 4dc1dec commit dd583a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions platform/iphone/CoronaViewControllerPrivate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ @interface CoronaViewController()

@implementation CoronaViewController

//// To support resizing windows we'll have to implement something here.
//-(void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
//{
//#ifdef Rtt_ORIENTATION
// CoronaView *coronaView = (CoronaView *)self.view;
// [coronaView notifyRuntimeAboutOrientationChange:[self interfaceOrientation]];
//#endif
// [coordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
// CoronaView *coronaView = (CoronaView *)self.view;
// [coronaView notifyRuntimeAboutOrientationChange:[self interfaceOrientation]];
// [coronaView didOrientationChange:nil];
// }];
//}

-(void)viewWillLayoutSubviews
Expand Down
3 changes: 0 additions & 3 deletions platform/iphone/CoronaViewPrivate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,6 @@ - (void)addApplicationObserver
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil];
#ifdef Rtt_ORIENTATION
[[NSNotificationCenter defaultCenter] addObserver:self.orientationObserver selector:@selector(didOrientationChange:) name:UIDeviceOrientationDidChangeNotification object:nil];
#endif
}

- (void)removeApplicationObserver
Expand Down

0 comments on commit dd583a1

Please sign in to comment.