Objective-c – How to hide status bar in iPhone OS 3.0

iphoneobjective-c

I have an iPhone application where I use image pickerview to select the photo from the iPhone photo library. In Info.plist file I use the status bar hidden. In iPhone OS 2.2.1 status bar are not shown. But when I debug this application in iPhone OS 3.0 then the status bar is being shown. But not at the beginning shows when I call imagepickerview to select photos. What can I do for hiding the status bar iPhone OS 3.0?

Best Solution

Try this code:

[[UIApplication sharedApplication] setStatusBarHidden: YES animated: NO];