I would like to transition from an “initialization screen” to a “presentation screen” in my application. The initialization screen has the status bar visible but I want the presentation screen to use the full screen. I would like the status bar to disappear when the initialization screen does, not before or after it.
In my callback from the initialization screen view controller that says “ready to run” I do this:
[UIView transitionFromView: setupViewController.view toView: runViewController.view
duration: 1.0 options: UIViewAnimationOptionTransitionCurlUp
completion: ^(BOOL finished) {
[[UIApplication sharedApplication] setStatusBarHidden: YES withAnimation: UIStatusBarAnimationSlide];
}];
but with this the status bar is there until the curl-up animation completes, then it slides up.
So I tried this:
[UIView transitionFromView: setupViewController.view toView: runViewController.view
duration: 1.0 options: UIViewAnimationOptionTransitionCurlUp
completion: nil];
[[UIApplication sharedApplication] setStatusBarHidden: YES withAnimation: UIStatusBarAnimationSlide];
but with this the status bar slides up before the curl-up animation starts.
So I tried this:
[UIView beginAnimations: @"whatever" context: nil];
[UIView setAnimationDuration: 1.0];
[UIApplication sharedApplication].statusBarHidden = YES;
[UIView transitionFromView: setupViewController.view toView: runViewController.view
duration: 1.0 options: UIViewAnimationOptionTransitionCurlUp completion: nil];
[UIView commitAnimations];
and I get the simultaneous action but the status bar just fades away instead of sliding up.
What I would really like is for the status bar to curl-up with the initialization screen (if I am using curl-up or flip if I am using flip) to reveal the full screen but I will settle for the status bar to slide up during the 1.0 second interval that the initialization screen is curling up.
Thanks for any suggestions…
It seems the third method is working as you wish except you’ve used the line:
instead of:
which allows you to set the slide up animation.
However, I don’t think it’s possible to include the status bar in the curl up animation.