iOS 9.3 系统字体名称是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36469749/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is iOS 9.3 system font name?
提问by 0ndre_
I would like to know the name of the default system font on the iPhone. It used to be "HelveticaNeue" I guess , but now?
我想知道 iPhone 上默认系统字体的名称。我猜它曾经是“HelveticaNeue”,但现在呢?
回答by Joe Benton
iOS 9 uses SanFranciscoUIDisplay and SanFranciscoText as their default font.
iOS 9 使用 SanFranciscoUIDisplay 和 SanFranciscoText 作为默认字体。
SanFranciscoUIDisplay is used for titles and larger font wheres SanFranciscoText is used for paragraph text and smaller font.
SanFranciscoUIDisplay 用于标题和较大的字体,而 SanFranciscoText 用于段落文本和较小的字体。
They are the System Font in Xcode or you can download them here (but you need a developer account):
它们是 Xcode 中的系统字体,或者您可以在此处下载它们(但您需要一个开发者帐户):
You can use the default font like this:
您可以像这样使用默认字体:
Swift 2:
斯威夫特 2:
UIFont.systemFontOfSize(15)
Swift 3 and Swift 4:
斯威夫特 3 和斯威夫特 4:
UIFont.systemFont(ofSize: 15)
回答by kuzdu
Swift 3 & 4
斯威夫特 3 & 4
UIFont.systemFont(ofSize: 15)