我想显示一个多色复杂图标,类似于默认计时器应用程序图标:
这是我以多色显示图标的代码:
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 为中心图像着色,用另一种颜色为外部图像着色?