Contents

getPlaceholderTemplate(for:withHandler:)

Gets a static template to display in the selection screen for your complication.

Declaration

optional func getPlaceholderTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void)

Parameters

  • complication:

    The complication tied to the request. Use the complication family information in this object to determine which set of templates are valid.

  • handler:

    The handler to execute with the template. This block has no return value and takes the following parameter:

    template

    The template object containing your placeholder data. The data in this template is cached and displayed for your complication.

Discussion

When your app is first launched, ClockKit calls this method to retrieve an appropriate placeholder template for your complication. In the customization screen for the clock face, your placeholder template is displayed to the user during the selection process. The contents of the placeholder aren’t updated and are meant to convey the type of data your complication displays. They don’t need to convey actual user data.

See Also

Deprecated methods