1

I am going to have different background image for navigation bar.(e.g.:when it is pushed)

i use this code

if([self respondsToSelector: @selector( presentingViewController)]){            
        [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"sectionImage_iphone.png"] forBarMetrics:UIBarMetricsDefault];        
    }else{
        [self.navigationController.navigationBar.layer.contents removeFromSuperlayer];
        self.navigationController.navigationBar.layer.contents = (id)[UIImage imageNamed:@"sectionImage_iphone.png"].CGImage;
  }   

If i call it again does the background image is replaced or stacked? if stacked, how to remove it?(for ios 4 and 5)

Thank You

edric_s
  • 227
  • 3
  • 11
  • This Post http://stackoverflow.com/questions/704558/custom-uinavigationbar-background Might help you – HeikoG Nov 17 '11 at 08:00
  • that one is only used once right? i already can make background image for navigation bar. What i want to do is to replace it. – edric_s Nov 18 '11 at 06:40

0 Answers0