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);
}
}
At this time, you can't offer multiple choices for a particular family. You're expected to choose the best template among the ones offered for that family.
For your particular example, there are seven different modular small templates. Even if you limited yourself to giving the user two choices, it wouldn't scale well if every app that supported complications doubled or tripled the number of choices they offered within a particular family.
UX perspective:
It avoids a disruptive user experience, from having to transition between scrolling by app to scrolling by an app's multiple choices, just for the user to get past your choices to a different app's complication that they want to select.
Developer perspective:
If a user could choose to show two or three of your app's different modular small complications at the same time, the complication server would have to call your particular data source multiple times just to keep every active complication of yours up to date. There's the daily budget to consider, not to mention our extensions becoming a bit harder to read and maintain, if we had to switch on family, and then by a particular template.
Apple appears to have chosen a good design for both users and developers by limiting it to one complication per family. If you have a reason to support more than one, you can submit a feature request to the Apple Watch team.