ios - 自定义字体在 WatchKit InterfaceFile 中显示自定义(未安装)

标签 ios swift watchkit xcode-6.2

我想从 UILabel 的 WatchKit 接口(interface)的属性检查器中选择“自定义”选项,但它被禁用了。 有人面临同样的问题吗?如果我遗漏任何东西,请给我指示; enter image description here

我正在使用 XCode 版本 6.2 (6C131e)

最佳答案

标准 iOS 字体仅在 iOS 设备上是标准字体。它们不包含在 Apple Watch 中。

文档显示了所有标准 WatchKit 字体样式的列表:

enter image description here

请注意屏幕截图中的短语“未安装”。

如果您想使用任何其他字体,您需要安装自定义字体。来自 the WatchKit docs :

To use custom fonts, you must install those fonts by doing the following:

  • Include the custom font file in both your WatchKit app and your WatchKit extension bundle.
  • Add the UIAppFonts key to your WatchKit app’s Info.plist file, and use it to specify the fonts you added to the bundle. For more information about this key, see Information Property List Key Reference.

关于ios - 自定义字体在 WatchKit InterfaceFile 中显示自定义(未安装),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29473342/

相关文章:

ios - AVAsset 的 NaturalSize 与视频文件不同

ios - 在 iOS Swift 中下载 mp3 格式的 youtube 视频

ios - UIColor 获取色调 :saturation:brightness:alpha: returns NO

objective-c - Swift 模块不使用 L10N 中的本地化内容

ios - Swift 在 View 和它的 ViewController 之间交换变量

ios - 如何使用 WatchKit 创建圆形图像?

ios - worklight6.0 中的自定义插件安装过程

swift - UISwipeGestureRecognizer.Direction.down

ios - 类消息的接收者类型 "WkAlertAction"是前向声明

watchkit - 对于 Watch Complication 和 Time Travel,getTimelineEntriesForComplication 被(太)经常调用