@@ -1022,6 +1022,7 @@ - (void)showLockScreenOver:(UIView *)superview withAnimation:(BOOL)animated with
10221022 // and if we would have added the view anywhere else, it wouldn't display properly
10231023 // (having a modal on screen when the user leaves the app, for example).
10241024 [self rotateAccordingToStatusBarOrientationAndSupportedOrientations ];
1025+
10251026 CGPoint superviewCenter = CGPointMake (superview.center .x , superview.center .y );
10261027 CGPoint newCenter;
10271028
@@ -1053,12 +1054,11 @@ - (void)_prepareNavigationControllerWithController:(UIViewController *)viewContr
10531054 [viewController.navigationController pushViewController: self
10541055 animated: YES ];
10551056 self.navigationItem .hidesBackButton = _hidesBackButton;
1056- [self rotateAccordingToStatusBarOrientationAndSupportedOrientations ];
10571057
10581058 return ;
10591059 }
1060- UINavigationController *navController =
1061- [[UINavigationController alloc ] initWithRootViewController: self ];
1060+
1061+ UINavigationController *navController = [[UINavigationController alloc ] initWithRootViewController: self ];
10621062 navController.modalPresentationStyle = UIModalPresentationFullScreen;
10631063
10641064 // Make sure nav bar for logout is off the screen
@@ -1069,10 +1069,12 @@ - (void)_prepareNavigationControllerWithController:(UIViewController *)viewContr
10691069 // Make sure UITextAttributeTextColor is not set to nil
10701070 // barTintColor & translucent is only called on iOS7+
10711071 navController.navigationBar .tintColor = self.navigationTintColor ;
1072+
10721073 if ([self respondsToSelector: @selector (setEdgesForExtendedLayout: )]) {
10731074 navController.navigationBar .barTintColor = self.navigationBarTintColor ;
10741075 navController.navigationBar .translucent = self.navigationBarTranslucent ;
10751076 }
1077+
10761078 if (self.navigationTitleColor ) {
10771079 navController.navigationBar .titleTextAttributes =
10781080 @{ NSForegroundColorAttributeName : self.navigationTitleColor };
@@ -1081,7 +1083,6 @@ - (void)_prepareNavigationControllerWithController:(UIViewController *)viewContr
10811083 [viewController presentViewController: navController
10821084 animated: YES
10831085 completion: nil ];
1084- [self rotateAccordingToStatusBarOrientationAndSupportedOrientations ];
10851086}
10861087
10871088
@@ -1119,6 +1120,7 @@ - (void)_prepareAsLockScreen {
11191120 if (_isCurrentlyOnScreen && !_displayedAsLockScreen) {
11201121 [self _cancelAndDismissMe ];
11211122 }
1123+
11221124 _displayedAsLockScreen = YES ;
11231125 _isUserTurningPasscodeOff = NO ;
11241126 _isUserChangingPasscode = NO ;
0 commit comments