Using setSourceType with image picker up hides status bar
        Posted  
        
            by Aaron
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Aaron
        
        
        
        Published on 2009-12-26T19:17:19Z
        Indexed on 
            2010/06/03
            1:24 UTC
        
        
        Read the original article
        Hit count: 338
        
iphone
I am pretty sure this is a bug but I thought I would check. I used the camera overlay to add a button so that on the iphone a user can switch from the camera view to the photo library. When button is taped the source type switches fine but the status bar is missing from the photo library. Throughout the rest of that session the status bar remains missing from all views evet thougth isStatusBarHidden reports NO.
This is how the camera overlay view is created
if (cameraOverlayView == nil) {
    [[NSBundle mainBundle] loadNibNamed:@"CameraOverlayView" owner:self options:nil];
}
If camera is available this is when I set source type and add overlay
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
	[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
	[imagePicker setCameraOverlayView:cameraOverlayView];
}
Here is the action statement to change source type.
- (IBAction)selectImage; { [imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; }
If I don't tap the button on the overlay there is no problem with the status bar.
PS. I did submit a bug report on this.
© Stack Overflow or respective owner