gpt4 book ai didi

swift - 是否可以在带有 iOS8 的新 XCode 中自定义 UIAlertController 的字体和外观?

转载 作者:行者123 更新时间:2023-11-28 09:18:35 24 4
gpt4 key购买 nike

我想知道是否可以使用 UIAlertController 自定义应用提醒。我还没有看到任何明确表示可以的内容。有谁知道我可以添加自定义外观的方法,尤其是这些警报中的字体?

最佳答案

您可以使用 appearanceWhenContainedIn 来完成。要设置背景颜色,这里有一个例子:

[[UIView appearanceWhenContainedIn:UIAlertController.class, nil] setBackgroundColor:[UIColor yellowColor]];

或染色:

[[UIView appearanceWhenContainedIn:UIAlertController.class, nil] setTintColor:[UIColor whiteColor]];

关于swift - 是否可以在带有 iOS8 的新 XCode 中自定义 UIAlertController 的字体和外观?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26357066/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com