As a starting point to creating complications, static data can be presented in the following way by implementing the Complications delegate example code shown below:
This structure implies that I am only able to create one complication per complication family. Is this true? Are there any other options I have here?
For example, how would I create another modular small complication in addition to the one below, of a different type, ie. CLKComplicationTemplateModularSmallStackImage so that both would show in the modular small region?
Is this possibly a user-preference that can be managed?
#pragma mark - Placeholder Templates
- (void)getPlaceholderTemplateForComplication:(CLKComplication *)complication withHandler:(void(^)(CLKComplicationTemplate * __nullable complicationTemplate))handler {
// This method will be called once per supported complication, and the results will be cached
if (complication.family == CLKComplicationFamilyModularSmall){
CLKComplicationTemplateModularSmallStackText *template = [[CLKComplicationTemplateModularSmallStackText alloc] init];
// template.headerTextProvider = [CLKSimpleTextProvider textProviderWithText:@"Title Text"];
template.line1TextProvider = [CLKSimpleTextProvider textProviderWithText:@"TEXT1"];
template.line2TextProvider = [CLKSimpleTextProvider textProviderWithText:@"TEXT2"];
template.tintColor = [UIColor whiteColor];
handler(template);
} else if (complication.family == CLKComplicationFamilyModularLarge){
CLKComplicationTemplateModularLargeStandardBody *template = [[CLKComplicationTemplateModularLargeStandardBody alloc] init];
template.headerTextProvider = [CLKSimpleTextProvider textProviderWithText:@"Text1"];
template.body1TextProvider = [CLKSimpleTextProvider textProviderWithText:@"Text2"];
template.body2TextProvider = [CLKSimpleTextProvider textProviderWithText:@"Text3"];
UIImage *surfMain = [UIImage imageNamed:@"person"];
template.headerImageProvider = [CLKImageProvider imageProviderWithOnePieceImage:surfMain];
handler(template);
}
}