Xcode:如何在应用程序中一次更改所有字体? [英] Xcode: How to change all fonts at once in an app?
问题描述
我想知道是否可以一次更改大约100个不同视图控制器上的字体?这比一个接一个地更改它们要容易得多.有任何想法吗?谢谢!
I was wondering if it was possible to change the fonts on about 100 different viewcontrollers all at once? It would be a lot eisier than going through one by one and changing them. Any ideas? Thank you!
推荐答案
用户界面文件(* .xib)是纯文本,您可以将它们加载到编辑器中.
The user interface files (*.xib) are plain text and you can load them into an editor.
在左窗格的Xcode4中,您可以右键单击>打开为">源".
In Xcode4 on the left pane you can right-click > open as > source.
这将为您提供XML源,您可以在那里找到/替换.
This will give you the XML source any you can find/replace there.
警告:如果做错了事,可能会使整个文件变得无用,因此,除非您始终具有源代码控制,否则请在尝试更改之前制作XIB的副本.
Warning: doing something wrong may render the whole file useless, so unless you have source control anyway, make copies of the XIB before attempting changes.
这篇关于Xcode:如何在应用程序中一次更改所有字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!