Question

I have a MPMediaPickerController that lets the user pick his/her own songs in my app. Problem is my app has the "black" navigation bar throughout and the picker is the standard blue. Now I know it's not allowed/possible to subclass the picker but is there any other way to change the navigation bar to "black"?

Was it helpful?

Solution

I ended up doing a category.

@implementation UINavigationBar (CustomImage)
- (void)drawRect:(CGRect)rect {
    UIImage *image = [UIImage imageNamed:@"CustomNavBar.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];

    self.barStyle = UIBarStyleBlack;
}

This will however change all navbars.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top