From the course: Apple watchOS App Development: Advanced APIs

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Large text complication templates

Large text complication templates

- [Instructor] You've now learned how to make complications that can launch an application. Complications can give information to the user as well, such as weather or battery level. Your first step for a more robust complication use is setting up some complication templates. For each family of a complication, you set up a template in the complication data source. In this lesson, I'll configure the utilitarian large for the bottom of the watch face. But in a real app, Apple suggests configuring all complication families. At the top of the ComplicationController.swift class, I'll write a function to configure my complication template. So what I'm going to do is I'm going to add an extra mark in here so that I can keep these straight. And my first one will be func utilitarianLarge. And I'm going to put a parameter of text on this 'cuz I'm going to be passing text to it. Which is a string. And these will return a CLKComplicationTemplate. And this is the general format for these template…

Contents