Remove Custom UINavigationBar

Posted by Lithium on Stack Overflow See other posts from Stack Overflow or by Lithium
Published on 2010-05-07T10:14:54Z Indexed on 2010/05/07 10:18 UTC
Read the original article Hit count: 379

Filed under:
|
|
|

Hi,

I've customized my UINavigationBar with an image like that :

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

When I launch a video my custom NavigationBar (with the picture) is on the top or I would like to have the default navigationBar style when I'm playing a video.

I tried to hide the navigationBar with

[self.navigationController setNavigationBarHidden:YES animated:animated];

but it just remove the navigationBar in my controller but I still have the NavigationBar.png when I'm playing a video. I tried to set the barstyle but it doesn't work either ...

self.navigationController.navigationBar.barStyle = UIBarStyleDefault;

Could you help me ?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about custom