Sag*_*mar 3 swift apple-watch watchkit apple-watch-complication watchos-3
我想为手表应用设计模块化的大型复杂功能。在我的复杂视图中,我希望用户同时使用图像和文本。
我有一些与设计相关的问题,如下所示:
我已经检查了模块大型复杂苹果文档,但我没有得到足够的信息。Apple Doc:- 模块化大型复杂功能
如何在复杂视图的多行中同时设置图像和文本?
您实际上正在寻找错误类型的并发症,您需要检查CLKComplicationTemplateModularLargeColumns。
您可以使用以下代码来了解如何创建它:
func createTemplateForModularLarge() -> CLKComplicationTemplate {
let template = CLKComplicationTemplateModularLargeColumns()
template.row1ImageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: ""))
template.row2ImageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: ""))
template.row3ImageProvider = CLKImageProvider(onePieceImage: #imageLiteral(resourceName: ""))
template.row1Column1TextProvider = CLKSimpleTextProvider(text: "")
template.row2Column1TextProvider = CLKSimpleTextProvider(text: "")
template.row3Column1TextProvider = CLKSimpleTextProvider(text: "")
return template
}
Run Code Online (Sandbox Code Playgroud)
最多可支持多少行模块化大型复杂显示用途?
对于 CLKComplicationTemplateModularLargeColumns 类型,您最多可以使用 3 行。
如何为同一个系列创建多个复杂功能,例如为单个应用程序提供环形、简单和堆栈的圆形小型复杂功能?
似乎您不能为单个应用程序为同一个系列创建不止一种类型。
| 归档时间: |
|
| 查看次数: |
428 次 |
| 最近记录: |