开发者

edit/done button, change done button background color

I have a UITableView with a navigation bar on the top. I changed the style of the navigation bar to Black Opaque to go with my theme.

I added an edit button as well using the below line of code

self.navigationItem.leftBarButtonItem = self.editButtonItem;

All is fine so far, the edit button also appears in the balck opaque style.

however the done button appears in the default blue theme. Am i missing some simple thing? How should i change it?

Help would开发者_如何学运维 be appreciated


The done button is always blue on a UIBlackBarStyle Navigation bar, but will adjust its color if you use the tintColor property of the navigationBar to color it in your chose of colors. I haven't tried it, but an idea would be to set

self.navigationController.navigationBar.tintColor = [UIColor blackColor];

this should give you a Black navigation bar with a black done Button.

However, for consistency reasons you can not directly set your custom background color on the done button.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜