tags:

views:

65

answers:

1

Hi, how can I skin the look of the button in UINavigationBar?

Tried this UIBarButtonItem *myToolbarItem = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"myImage.png"] style:UIBarButtonItemStyleBordered target:self action:nil] autorelease];

Doesn't quite do it.

Thanks, Tee

A: 

Hi teepusink,

try to do this:

UIBarButtonItem *customItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"imageName.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(nameOfSomeMethod:)];
    self.navigationItem.leftBarButtonItem = customItem;
    [customItem release];

This will place your custom button on the left side of your navigation bar.

Cheers,
VFN

vfn