使用外观更改背景颜色 table 查看箭头?

Using appearance changes the background color table view arrow?

我正在开发一个我正在使用 themes.For 的应用程序 我在 iOS.I 中使用 Appearance 我能够更改 views.So 的背景颜色我更改了 UIButton 的背景颜色,然后 UITable 中箭头的背景颜色也发生了变化。

代码

 UIColor *color=[UIColor orangeColor];
[[UIButton appearance] setBackgroundColor:color]; 

屏幕

好像箭头也是UIButton的对象... 所以你必须专门设置表格视图单元格中箭头的背景颜色属性。

根据Apple's documentation of the UIAppearance protocol

To customize the appearances for instances of a class when contained within an instance of a container class, or instances in a hierarchy, use appearanceWhenContainedIn: to get the appearance proxy for the class.

对于你的情况我建议

[[UIButton appearanceWhenContainedIn:[UITableView class], nil] setBackgroundColor:nil];