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.
-
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.
- 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.
- 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.
- 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.
- Add another Action, this time Create Timer. Select a time interval in seconds, set the timer to repeat, and autoplay.
- In the nested Tick Event, add an If Else Action to test whether the Page Variable is currently
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.
- Add another Action to the nested True Event, this time Go To First View in Page Controller.
- In the nested False Event, add a Go To Next View in Page Controller Action.
- In the nested Tick Event, add an If Else Action to test whether the Page Variable is currently
true.
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.
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.
- 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.
- 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.
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.