New behavior in iOS using initWithFrame:self.window.bounds


#1

Hi,

I noticed a change / new behavior of iOS (at least 5.1) when creating the view (HypnosisView) using initWithFrame:[[self window] bounds]. With iOS 5.1 the status bar is hidden. There is no need to use “[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];”.

I now that at least with iOS 4.3 the status bar was visible and I needed to use “[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];”.

The solutions for the 3rd version of the book use “[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];” too. If you comment out this method the status bar is hidden too. So I believe the behavior using initWithFrame:[[self window] bounds] must have changed.

Can anybody explain the new behavior of iOS? Thanks a lot.

Frank