开发者

UIStatusBarStyleBlackTranslucent within a modalViewController

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 h开发者_Go百科as 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?


Try presenting it from the window.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜