【发布时间】:2013-06-18 15:45:35
【问题描述】:
我有以下问题。我有一个自定义的UIView,我尝试使用UIAppearance 设置它的背景。
[[OptionsHeader appearance] setBackgroundColor:[UIColor headBackgroundColor]];
但是当我这样使用它时,所有的视图都变成了黑白。
[[UIView appearance] setBackgroundColor:[UIColor headBackgroundColor]];
工作得很好,但我需要它在那个特定的类上工作得很好。
欢迎任何帮助。 亲切的问候, EZFrag
【问题讨论】:
-
您是否在自定义类中实现 UIAppearance 协议?
-
如果你想为特定的视图添加背景颜色比使用背景属性更好。
-
是的,我已经尝试添加 UIAppearance 协议。
-
哦,它不适用于特定的单个视图。该应用程序共有大约 150 个屏幕,适用于 iPhone 和 iPad。你可以看到我要去哪里以及为什么......
标签: ios themes uiappearance