【问题标题】:Is it possible to customize the font and appearance of a UIAlertController in the new XCode w/ iOS8?是否可以在带有 iOS8 的新 XCode 中自定义 UIAlertController 的字体和外观?
【发布时间】:2014-10-14 09:21:42
【问题描述】:

我想知道是否可以使用 UIAlertController 自定义应用程序警报。我还没有看到任何明确说你可以的东西。有谁知道我可以添加自定义外观的方法,尤其是这些警报上的字体?

【问题讨论】:

标签: swift ios8 uialertcontroller


【解决方案1】:

您可以使用外观时包含在其中。要设置背景颜色,下面是一个示例:

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

或着色:

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

【讨论】:

  • 字体怎么样?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-11-05
  • 2020-08-04
  • 2017-03-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多