本文介绍了设置xcode项目的默认字体样式,颜色和大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的应用程序有一个特定的配色方案,所以我想知道是否可以设置默认背景颜色,文本颜色和字体大小,以便每次创建新视图时,或者Interface Builder中的标签我不必更改所有这些参数。

The app I'm working on has a particular color scheme, so I was wondering if it is possible to set a "default" background color, text color, and font size so that every time I create a new view, or label in Interface Builder I don't have to change all of these parameters.

推荐答案

从iOS 5开始,有 UIAppearance 协议。使用外观代理,您可以在给定的应用程序中设置该类型的所有对象的外观。更多信息可以在关于

As of iOS 5, there is the UIAppearance protocol that all of the standard UI elements implement. Using the "Appearance proxy" you can set the appearance for ALL objects of that type in a given application. More information can be found in the incredibly helpful and informative WWDC '12 session on "Advanced Appearance Customization on iOS"

这篇关于设置xcode项目的默认字体样式,颜色和大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 17:59