Getting into the controller and calling the reenteringViewController method shown below after the view appears ignores the preferred set of StatusBarUpdateAnimation set in the view controller and instead uses the slide animation (which was previously used in the old controller, but was set to disappear before appearing on the current controller )
-(void)reenteringViewController{
[UIView animateWithDuration:0.7 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^
{
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate) withObject:nil];
}
}
completion:^(BOOL finished){
}];
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation{
return UIStatusBarAnimationFade;
}
-(BOOL)prefersStatusBarHidden{
return NO;
}
Has anyone experienced this before, and if so, did they find a solution? I spent a lot of time using the code, but it is very simple and everything seems to name things correctly, but just does not use the correct animation. It looks like it could be an iOS7 bug.
I appreciate your help in advance.