开发者

Changing color of UITableViewCellAccessoryCheckmark and UITextField

开发者 https://www.devze.com 2023-01-20 13:57 出处:网络
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 t

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

精彩评论

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

关注公众号