1. Home
  2. Tutorials
  3. Creating your App UX
  4. Update Display at Timed Intervals

Update Display at Timed Intervals

slide timer
Your app can carry out functionality at specified time intervals using the Create Timer Action. You can execute various types of Action, for example progressively toggling between the sections in a container view as outlined below.

  1. Add a Page Controller to a page in your app. Inside it, add a few Page Controller Views. In each Page Controller View, add some content, for example Text Views if you want to display information for the user to read.
    page controller
  2. Each time the time interval elapses, the app will move to the next view in the Page Controller, but when it gets to the final view it will need to navigate back to the first one – to track that add a Page Variable, naming it last and choosing a Swift - Bool data type.
    boolean variable
  3. Select the final Page Controller View and open Properties > Events. Select the View Appeared Event and add an Action, choosing Set Value. Set the variable to true. set true
  4. The toggling will begin when the page loads, so select the page in the Element Tree (it’s the parent Element) and open Properties > Events. Open the Page Loaded Event.
    • Add an action, choosing Set Value. Initially set the Page Variable you created to false. set false
    • Add another Action, this time Create Timer. Select a time interval in seconds, set the timer to repeat, and autoplay.
      create timer

      • In the nested Tick Event, add an If Else Action to test whether the Page Variable is currently true. if true
        • In the nested True Event, the last view must be visible, so set the variable back to false and move back to the initial view. First add a Set Value Action, setting the variable to false. set false
        • Add another Action to the nested True Event, this time Go To First View in Page Controller. first view
        • In the nested False Event, add a Go To Next View in Page Controller Action. next view

Test your app to see the toggling in action. If you want to display information that will appear the first time an app runs, you can create an onboarding screen. You can also toggle visibility in your app when Events occur. The math Action also allows you to carry out calculations in your app.

pager slide
Your app can carry out functionality at specified time intervals using the Start Timer Action. You can execute various types of Action, for example progressively toggling between the sections in a container view as outlined below.

  1. Add a View Pager to a page in your app. Inside it, add a few Pager Views. In each Pager View, add some content, for example Text Views if you want to display information for the user to read. view pager
  2. The toggling will begin when the page loads, so select the page in the Element Tree (it’s the parent Element) and open Properties > Events. Select the On Load Event.
    • Add an Action, choosing Start Timer. For the Interval and Tick Interval enter the number of seconds for one full cycle to complete and the time for each view to appear, so for three views displaying for 5 seconds each, enter 15 and 5. Set the timer to repeat. start timer
      • In the nested Tick Event you can specify what should happen when the tick elapses, so add a Go To Next View in View Pager Action. next view pager
      • In the nested Timer Finished Event, the interval has elapsed, so add a Go To View in View Pager Action go back to the first view, which has an index of 0. zero view

Test your app to see the toggling in action. If you want to display information that will appear the first time an app runs, you can create an onboarding screen. You can also toggle visibility in your app when Events occur. The math Action also allows you to carry out calculations in your app.

Was this article helpful to you? Yes No

How can we help?