开发者

How to tell UINavigationBar to ignore a custom category?

I'm having a little problem with customising an app's navigation bar and using an image picker.

I have a category that overrides the drawRect method of the app's nav bar, it changes the background image to a mostly white image. This works fine except when I call an image picker to let the user choose a pic from their library.

Firstly the image picker's nav bar displays the custom image but its title text is white which gets lost on the white b开发者_JAVA百科ackground. And secondly the status bar is semi transparent which looks weird against the white navbar.

Is there anyway I can tell the image picker's nav bar to ignore the category I created and to use its default drawRect method?

Many thanks for any advice.


You cannot make a category apply only sometimes. The way categories work means that you use it always or never. The only workaround I can think of is to somehow check inside of the categories' overridden method to see what instance you're in.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜