Swift 用于Apple Watch的Xcode tintedImageProvider rectangularTemplate.imageProvider

Swift 用于Apple Watch的Xcode tintedImageProvider rectangularTemplate.imageProvider,swift,xcode,apple-watch,apple-watch-complication,Swift,Xcode,Apple Watch,Apple Watch Complication,我有一个问题,多年来我一直想靠自己解决,但运气不佳。 我在这里使用苹果的文档和视频 我从代码中创建了一个图形,该代码根据苹果手表表面的方形数据生成png。在compliationcontroller.swift文件中,我有以下代码 graphicRectangularImage = UIImage(cgImage: context.makeImage()!, scale: 2.0, orientation: .up) ... rectangularTemplate.imageProvider =

我有一个问题,多年来我一直想靠自己解决,但运气不佳。 我在这里使用苹果的文档和视频 我从代码中创建了一个图形,该代码根据苹果手表表面的方形数据生成png。在compliationcontroller.swift文件中,我有以下代码

graphicRectangularImage = UIImage(cgImage: context.makeImage()!, scale: 2.0, orientation: .up)
...
rectangularTemplate.imageProvider = CLKFullColorImageProvider(fullColorImage: graphicRectangularImage)
并将并发症的隐私设置为
处理程序(.hideOnLockScreen)

这对于创建全彩图像非常有用。锁定时,它会隐藏起来

因此,当用户有一个五颜六色的脸,这是很好的。 但是如果我加上这样的两张图片

graphicRectangularImage = UIImage(cgImage: context.makeImage()!, scale: 2.0, orientation: .up) 
twoPieceImageBackground = UIImage(cgImage: context.makeImage()!, scale: 2.0, orientation: .up) 
twoPieceImageForeground = UIImage(cgImage: context.makeImage()!, scale: 2.0, orientation: .up)  

let tintedImageProvider = CLKImageProvider(onePieceImage: graphicRectangularImage, twoPieceImageBackground: twoPieceImageBackground, twoPieceImageForeground: twoPieceImageForeground)  

rectangularTemplate.imageProvider = CLKFullColorImageProvider(fullColorImage: graphicRectangularImage, tintedImageProvider: tintedImageProvider)
前景图像只是条和“过去7天:”这两个字,因为这是我想要的唯一两位黄色。 背景是图像的其余部分,因此可以是灰色的。 它适用于多色屏幕,但当使用着色图像提供程序时,锁定后图像不会隐藏

图像在锁定时不隐藏。但如果你改回多色,它的行为是正确的,这是奇怪的一点

锁定的图像似乎来自于我放在“复杂”部分下“复杂”的“资产”文件夹中的图像文件,但没有空间让我为两个peice图像添加锁定的图像,因此它只是使用已经存在的图像文件,除了应用程序名,锁定时会发生更改


请帮我指出正确的方向,以便在Apple Watch锁定时隐藏着色的前景图像。

我使用我的开发者帐户的免费代码支持令牌,与Apple开发者技术支持团队的一名成员交谈,他能够重新创建问题,并建议我提交错误报告FB7742362我使用了我的免费代码支持令牌与我的开发者帐户,并与苹果开发者技术支持团队的一名成员交谈,他能够重新创建问题,并建议我提交错误报告FB7742362