开发者

Changing color of UITableViewCellAccessoryCheckmark and UITextField

I w开发者_运维知识库ant to change the color of UITableViewCellAccessoryCheckmark and UITextField background color where we type. I found this is not straight forward.


I solved this issue by changing the tint color of the UITableView where the cell belongs.

Update the Tint Color of UITableView in interface builder to Default

or programmatically as below.

For Objective C

yourTableView.tintColor =  [UIColor blackColor];

For Swift

yourTableView.tintColor = .black


By default,you cannot change the color of UITableViewCellAccessoryCheckmark

But alternatively you can use the image for this..as just like checkmark

while for textField you can use this single line..

[textField setBackgroundColor:[UIColor redColor]];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜