UINavigationBar back button skinning
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] autorele开发者_运维问答ase];
Doesn't quite do it.
Thanks, Tee
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
精彩评论