Building what Dima answered, I thought that a basic implementation could help to get people to start. Since Dima said that he does not move the status bar, he moves the image of the status bar.
Disclaimer I followed this procedure, so I cannot guarantee if this will work out of the box.
Starting with iOS7, you can take a picture with
UIView *screen = [[UIScreen mainScreen] snapshotViewAfterScreenUpdates:NO];
So basically the status bar is cropped from the picture and added to the UIWindow with windowLevel above the UIWindowStatusLevelBar so you can see it on top of the real status bar. Sort of:
UIWindow *statusBarWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; statusBarWindow.windowLevel = UIWindowLevelStatusBar + 1;
Now it all depends on how your implementation looks, but from here you just need to handle moving the view with panning or any other action that causes a new view to appear on the side.
When you start scrolling, configure a new status bar (under it) with any style, background, anything:
[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
Now we have something interesting. As the transition moves, you will need to use the amount that it scrolls to “cut off” this offset value from the statusBarView . statusBarView.frame should start with x = offset, otherwise it will be displayed on top of the actual status bar (since this window is larger), but if you do not change the contentInsets, then the image will move with the transition. Thus, to create an illusion, you will need to drag the beginning to the right, increasing the insertion of the contents on the left by the same amount so that it appears in the same place.
Thus, a sliding action is processed inside any method:
Note. This will depend heavily on personal implementation and is likely to take some experiments.
(Lateral note: you can also try using a transform rather than setting the frame explicitly: statusBarView.transform = CGAffineTransformMakeTranslation(offset -previousOffsetAmount, 0); I use the oldOffsetAmount parameter because you want it to move over any new amount to it could coincide. you need to somehow track if you go along this route)
And finally, after completing the “slide”, be sure to completely remove the screenshot from the window:
// if continuing from before: if (midTransition) { ... } else { // the view has been slid completely [statusBarView removeFromSuperview]; statusBarView = nil; // I'm keeping the UIWindow where it is for now so it doesn't have to be recreated and because it has a clear background anyways } // if this is being done via animation the above can be called the animation finishes
In fact, I could try to get this to work, so it will update if that is the case.