iphone - How do I change the background of a UINavigationBar? -
i'd change background of uinavigationbar [uicolor colorwithimage:]
, isn't working. missing?
edit:
once i've created subclass, set uinavigationcontroller use it?
you can use tintcolor
property change colour of uinavigationbar
, set image background you'll have provide own uinavigationbar
subclass , override drawrect:
method, example:
- (void)drawrect:(cgrect)rect { // drawing code uiimage *img = [uiimage imagenamed: @"background-image.png"]; [img drawinrect:cgrectmake(0, 0, self.frame.size.width, self.frame.size.height)]; }
if use interface builder build ui use custom navigation bar, select uinavigationbar element in interface builder, open inspector , in identity tab specify uinavigationbar subclass in class field, so:
Comments
Post a Comment