【发布时间】:2020-03-04 20:54:45
【问题描述】:
我使用包含 UIImageView 和 UIButton 的 Interface Builder 创建了一个简单的视图控制器。在这两个上,我将tintColor 设置为洋红色。
在 AppDelegate 上,我将 UIView.appearance.tintColor 设置为青色。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIView.appearance.tintColor = UIColor.cyanColor;
return YES;
}
运行应用程序时,我得到以下信息:
这对我来说没有意义。我希望直接在 imageView 和按钮上指定的洋红色 tintColor 覆盖 Cyan tintColor。
为什么会这样?
作为参考,我使用的是 Xcode 版本 11.2 (11B52)。
【问题讨论】:
标签: ios storyboard uiappearance