Events for Changing and Transitioning Pages
- OpenPage – the value will be the item in the Pages dictionary (and corresponding .sks file) of the scene to open.
- Continue – No value needed, this will make the Scene change to the last viewed Page (from previously using the app).
- NextPage – The value should equal the name of an Array in the PageOrder dictionary. For example, “Chapter1”. The kit will choose the next page to go to by finding the current page in the page order and going to the next one.
- PreviousPage – The value should equal the name of an Array in the PageOrder dictionary. For example, “Chapter1”. The kit will choose the previous page to go to by finding the current page in the page order and going to the one before it.
- OpenRandomPage – The value should equal the name of an Array in the Pools dictionary. This will pick a random item from the array and go to that page.
- Transition – Enter a value of either CrossFade, DoorsCloseHorizontal, DoorsCloseVertical, DoorsOpenHorizontal, DoorsOpenVertical, DoorWay, FadeWithColor, Fade, FlipHorizontal, FlipVertical, MoveInWithDirection, PushWithDirection, RevealWithDirection. This will adjust the value for the next transition.
- TransitionTime – Set a number value to specify the duration for the next page transition.
- TransitionDelay – Set a number value to specify the delay to occur before the next transition. If you set 5 and then call an OpenPage event, the transition will be delayed 5 seconds.
- TransitionColor – If the transition uses the color property, you can specify it by using a hex value or some generic colors like Red, Orange, Yellow, Green, Blue, Purple, Magenta, Cyan, Brown, Grey (or Gray), Black, White
- TransitionDirection – If the transition uses the direction property, you can specify it here using Up, Down, Left or Right
Note: these transition settings can all be set in the Pages > Settings dictionary.
If you stumbled onto this article, it is part of our documentation for the Story Tellers iOS Starter Kit 2. The kit enables you to make children’s book apps and games without writing any code! But it is Swift 2 based and compatible with iOS9 (or higher) and Xcode 7 (or higher), so kit buyers can even extend the functionality to fit their needs further. Some of what we cover in the kit documentation may apply to Xcode in general, so this article could be worth a read even if you aren’t a user. You can purchase Lifetime Updates the kit here, or subscribe Yearly to CartoonSmart and get the latest version, plus access to all of our other kits / tutorials.
We’ve also created an iBook to document the very latest properties in the kit, so be sure to download that as well.