tags:

views:

190

answers:

1

Hi,

I am trying to copy the UIImagePickerController as best as I can. If I do that in a regular UITableViewController it shows the StatusBar translucent and you can see the content behind it (just like in apples UIImagePickerController).

self.wantsFullScreenLayout = YES;
self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES];

But if I present a new UIViewController (with a UINavigationController as a subview) as a modalViewController:

[self.navigationController presentModalViewController:myImagePickerController animated:YES];

then the StatusBar becomes opaque, it still has this dark grey color but you can't see anything behind it. And yes I have wantsFullScreenLayout, etc. in myImagePickerController viewDidLoad() method.

How do I fix this so It behaves like apples UIImagePickerController, a modalView with translucent StatusBar?

A: 

Try presenting it from the window.

CiNN
How do you mean? I have to present it with presentModalViewController: otherwise it'll not behave like apples UIImagePickerController.
Jeena
that is what presentModalViewController is kind of doing under the hood.
CiNN