【发布时间】:2016-01-28 21:05:58
【问题描述】:
我想显示一个多色复杂功能图标,类似于默认计时器应用图标:
这是我以多色显示图标的代码:
CLKComplicationTemplateModularSmallStackImage* template=[[CLKComplicationTemplateModularSmallStackImage alloc]init];
template.line1ImageProvider=[CLKImageProvider imageProviderWithOnePieceImage:[UIImage imageNamed:@"Complication/Modular"]
twoPieceImageBackground:[UIImage imageNamed:@"ComplicationForeground/Modular"]
twoPieceImageForeground:[UIImage imageNamed:@"ComplicationBackgroud/Modular"]];
entry = [CLKComplicationTimelineEntry entryWithDate:[NSDate date]
complicationTemplate:template];
两张图片都有清晰的背景。如何用 whiteColor 为中心图像着色,用另一种颜色为外部图像着色?
【问题讨论】:
标签: objective-c xcode watchkit watchos-2 apple-watch-complication