Hi!,
I use macros to differ the versions but I can't force it to work properly. I used:
#ifdef _IPHONE_4_0
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
#else
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
#endif
and
#if __IPHONE_OS_VERSION_MAX_ALLOWED < _IPHONE_4_0
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
#else
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
#endif
and
#if defined(__IPHONE_4_0)
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
#else
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
#endif
No matter what version I use - always called only one of the lines. And the __IPHONE_4_0 is always defined. Any ideas?
Best Regards, Dmitry M.