Created
April 30, 2018 14:08
-
-
Save mlcollard/63ae18031fdc908705a6c76d59319d82 to your computer and use it in GitHub Desktop.
iOS: TVML: Navigating between pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<document> | |
<alertTemplate> | |
<description>This page has been pushed onto the navigation stack.</description> | |
</alertTemplate> | |
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadingDoc() { | |
var template = ` | |
<document> | |
<loadingTemplate> | |
<activityIndicator><text>Loading</text></activityIndicator> | |
</loadingTemplate> | |
</document> | |
`; | |
var templateParser = new DOMParser(); | |
var parsedTemplate = templateParser.parseFromString(template, "application/xml"); | |
navigationDocument.pushDocument(parsedTemplate); | |
} | |
App.onLaunch = function(options) { | |
loadingDoc() | |
var templateURL = "templates/PageNavigation.xml"; | |
getDocument(templateURL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment