Documentation Archive

Developer

Apple TV Markup Language Reference

On This Page

loadingTemplate

Use the loading template (loadingTemplate) to display a spinner and description of why the spinner is being displayed; for example, an interim page showing that the requested page is being loaded. A spinner is automatically presented when the page is displayed, and you can add text to tell your users what is happening. Figure 9-1 shows the basic layout for a layoutTemplate page. The theme for the loading template defaults to the system preference.

Figure 9-1Loading template image: ../Art/ATV_temps_loading_2x.png

Main Elements of the Loading Template

Listing 9-1 shows main elements in TVML format, and Table 9-1 describes the main elements.

Listing 9-1loadingTemplate TVML format
  1. <document>
  2. <loadingTemplate>
  3. <activityIndicator>
  4. <title>Title</title>
  5. </activityIndicator>
  6. </loadingTemplate>
  7. </document>

Table 9-1loadingTemplate element descriptions

Element

Description

activityIndicator

Image of a spinning wheel icon.

title

The text telling the user why there is a delay.

Loading Template Example

Listing 9-2 shows the TVML for a loadingTemplate example. Figure 9-2 shows the output of the loading template example.

Listing 9-2loadingTemplate example TVML
  1. <document>
  2. <loadingTemplate>
  3. <activityIndicator>
  4. <title>Loading requested page</title>
  5. </activityIndicator>
  6. </loadingTemplate>
  7. </document>
Figure 9-2loadingTemplate example output image: ../Art/loadingTemplateSS_2x.png