简体   繁体   中英

UIImagePickerController Status / Navigationbar iOS 7

I've run into another iceberg with iOS 7. I'm trying to present a UIImagePickerController and have it work with the status. Unfortunately, the picker does not want to play ball. When presented in a popover, the picker looks like this:

在此处输入图片说明

Our app uses a textured navigation bar which applied using [UINavigationBar apearance] but it is not being applied in this case. When the picker is presented on the iPhone, I get this result:

在此处输入图片说明

The navigation bar is textured as desired but it doesn't correctly merge with the status bar. This seemed like an easy problem to fix. I subclassed UIImagePickerController and set the bar position to be top attached and then textured the navigation bar.

This solved all my problems, but it caused the picker would no longer function. According to the docs, the class is not meant to be subclassed.

So I'm back where I started.

So my question ... how do I texture the navigation bar in the picker when presented in a popover and how do I set the barPosition for the navigation controller in the picker itself?

Any help or guidance is appreciated.

Thanks!

On an iPhone device:

If you use a custom image for the navigation bar, you now to size it to include the height of the status bar, else it'll fill in what's missing with a black background I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM