You need to register to notify UIApplicationDidChangeStatusBarOrientationNotification .
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarOrientationChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; - (void)statusBarOrientationChange:(NSNotification *)notification { UIInterfaceOrientation orient = [notification.userInfo[UIApplicationStatusBarOrientationUserInfoKey] integerValue];
Note that this approach never leads to face-up or face-down device orientations, as this only applies to the orientation of the interface.
source share