开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜