MusiGenesis
MusiGenesis

Reputation: 75336

How to get rid of strange black navigation bar in UIPopoverController in iOS 4

I'm using a popover controller in my iPad app. In iOS 5, the popover looks like this:

enter image description here

In iOS 4, it looks like this:

enter image description here

How can I get rid of this weird black background?

Update: I'm pretty sure this is a self-inflicted wound, as other apps my company produces do not have this weird black nav bar problem, even when running in iOS 4. We must have code somewhere that changes this background, but I'm not sure how that would even be done.

Upvotes: 0

Views: 510

Answers (1)

MusiGenesis
MusiGenesis

Reputation: 75336

It was indeed a self-inflicted wound. If anybody's interested, this category:

@implementation UINavigationBar (BackgroundImage)
- (void)drawRect:(CGRect)rect {

    UIImage *image = [UIImage imageNamed: @"top-toolbar.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];

}
@end

... will let you customize the navigation bar in pre-iOS 5, while simultaneously driving you crazy if you forget that you put it there yourself.

Upvotes: 1

Related Questions