Tuesday Discount - Lifetime Access for $20!!!! - Click Here!

Properties for the Page Settings Dictionary – Story Tellers iOS Starter Kit Documentation

Properties for the Page Settings Dictionary

Story Tellers iOS Starter Kit 2 Documentation

One of the first things you’ll probably want to do when creating a new page for your app, is setup a Settings dictionary in your new Pages entry. Each page can have it’s own Settings dictionary. For example, in the image below, you can see the Settings dictionary unfolded for the Cover page. Many of these properties are set to their defaults, so you typically won’t even need this many, but we’ve given you plenty of options. These settings only affect the current page, and don’t carry over from page to page. None of these properties are required either.

Page Settings Dictionary in your Childrens Book iOS9 App

  • DoNotMarkForContinue – a YES value will exclude this page from being saved as a continue point. Related: see the Continue property  (sorry, this property had a typo in the documentation earlier, it was DoNotMarkAsContinue, but it should have been DoNotMarkForContinue)
  • InitialCamera – the name value of an SKCameraNode you’ve added to the scene. Once you set this property the Scene’s “view” will use that camera. This option is important because you can treat the camera much like any other node. Move it around, scale it, make it follow a specific node, switch cameras, etc.
  • InitialCameraPhone – Like the property above, but only applies to iPhone devices. This is an important option because for many pages you could probably use a single Scene file (.sks file) instead of making an entire duplicate for the phone, and simply use a different camera dedicated to the phone. You can zoom using the Scale property. We suggest setting 0.75 for both the x and y of the camera dedicated to the phone.
  • CameraFollows – the value will be the node the camera will lock onto and follow. Most likely this will be the name of one of the Element class sprites you’ve added (but this could even be a particle emitter).
  • CameraFollowsOnX – the value will be the node the camera will lock onto and follow but ONLY on the x axis. This is a good option if your art work is sized in such a way that lowering or raising the camera would reveal the edges
  • CameraFollowsOnY  – the value will be the node the camera will lock onto and follow but ONLY on the y axis.
  • CameraOffset – an offset value in {x, y} format to adjust the camera in relation to the node it is following.
  • CameraOffsetPhone –  an offset value in {x, y} format to adjust the camera in relation to the node it is following. This value is ignored if the device is an iPad as it only affects the iPhone.
  • NodesFollowCamera – a String or Array of strings to define which nodes will stay locked onto the camera when it follows another node. Particularly useful for things like a background sky, because once locked into the camera it will appear infinite. In other words, you would not need to make the sky any larger than the camera.

SKCameraNode in your Childrens Book iOS9 App

Physics Settings

  • HasPhysicsBoundary – the simplest way to set a physics boundary around the scene. An edge boundary, can contain physics bodies within it, but they can’t get out. A boundary made with this setting is exactly the value of the initial visible screen area.
  • BoundaryWithMultiplier – Set a number value to multiply the edge-based boundary around the screen. For example, 2 would double the boundary’s width and height.
  • BoundaryWithMultiplierOnX  – Set a number value to multiply the edge-based boundary around the screen but keep the height the same as the screen height.
  • BoundaryWithMultiplierOnY  – Set a number value to multiply the edge-based boundary around the screen but keep the width the same as the screen width.
  • BoundaryWithMultiplierOnXAndY –  A string value in {x, y} format to non-uniformly multiply both the width and height of the boundary. For example, {2, 4} would double the boundary’s width and quadruple the boundary’s height.
  • BoundaryOffset –  Allows you to offset the boundary using {x, y} format. (probably necessary when using a multiplier)
  • BoundaryOffsetPhone –  Allows you to offset the boundary using {x, y} format. (probably necessary when using a multiplier). Only affects building to the phone
  • ShowPhysics  – Set to YES to the show the physics bodies around objects. Good for debugging (can also be done from the Scene file too)
  • Gravity – the gravity for the scene in {x, y} format. This can also be set in the Scene’s .sks file.

Setting Gravity in SKScene

Sound Settings

  • BgSoundVolume –  a decimal value to set the volume. 0.5 is 50%
  • BgSoundLoops – by default this is set to -1 which will always loop. Setting 1 would replay it once, 2 twice, and so on.
  • BgSoundContinueOnNextPage –  A YES or NO bool value as to whether to stop the background sound when the page changes. By default it is NO.
  • NarrationVolume  –  a decimal value to set the volume. 0.5 is 50%
  • NarrationLoops – by default this is set to 0 which will not loop. Setting 1 would replay it once, 2 twice, and so on.
  • NarrationContinueOnNextPage –  A YES or NO Bool value as to whether to stop the sound when the page changes. By default it is NO.

To find out more on playing sounds, visit this link.

 

Keyboard Settings

  • KeyboardType – if the keyboard will be seen at anytime on the page, you can change the type. Values are Default, ASCIICapable, NumbersAndPunctuation, URL, NumberPad, PhonePad, NamePhonePad, EmailAddress, DecimalPad, Twitter, Websearch
  • KeyboardAppearance – Light, Dark or Default. The keyboard below is set to Light.

Opening iOS keyboard from SKScene

Transition Settings (when going to the next page)

  • Transition – Should be either CrossFade, DoorsCloseHorizontal, DoorsCloseVertical, DoorsOpenHorizontal, DoorsOpenVertical, DoorWay, FadeWithColor, Fade, FlipHorizontal, FlipVertical, MoveInWithDirection, PushWithDirection, RevealWithDirection
  • TransitionTime  – Specify the duration for the next page transition as a number value.
  • TransitionColor  – If the transition uses the color property, you can specify  that 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
  • TransitionDelay – the duration to delay the next transition as a number value.. This could be useful if you wanted delay a page transition that was prompted via an event. For example, maybe the reader completed a puzzle and you wanted to show the finished result for 5 seconds before going to the next page (this could also be done using the StartTimer option).

Speech Options

These apply to text-to-speech features in the kit.

  • SpeechRate –  a decimal number value, default is 0.38
  • SpeechVolume – a decimal number value, default is 1.
  • SpeechPitch – a decimal number value, default is 1.70
  • SpeechVoice – a voice code or country name for a new voice
  • AllowRunOnSpeech – a Bool value.  Set YES and events that call text to speak will not interrupt the current speaking. So for example, calling a Speak event back to back will run the speech one after the other.

On-Demand Resource Settings

By adding an Array named ResourceTags and listing tag names, the Map page now knows that the tagged content is required for this page to open.

On Demand Resources in iOS9 for Childrens Book App

You can preload content from any page by using the PreloadResourceTags property. Again, this can be an array to list multiple tags, like so…

Preload On Demand Resources in iOS9 for Childrens Book App

So in the example above, we are preloading the MapTag, and this would be done assuming that the reader is close to opening a page that includes the MapTag content.

Camera / Camera Roll Settings

  • PageToOpenAfterPictureChoice – the value will be the name of a Page. After a picture is chosen from the Camera or CameraRoll the app will automatically jump to this page.
  • OrientationAfterPictureChoice – options are Left, Right, Portrait. This only runs after choosing an image from the camera
  • AutoRotatePictureChoiceFromRoll – a number in degrees to rotate the image after it is chosen from the Camera Roll. The default is 0.
  • AutoRotatePictureChoiceFromCamera  – a number in degrees to rotate the image after it is chosen from the Camera. The default is 0.

Speciality Settings

  • DebugMode – Setting a YES value will show developer nodes as print statements in the output window.
  • IgnoreSiblingOrder – if excluded the default is YES. When set to NO, this will make the SKView’s ignoreSiblingOrder property set to false, which is a less optimized way to render the view, but nodes respect zPositions in a better way. For example, in a coloring book app, newly created nodes are always drawn on top of each other. So if you are making a coloring book app, definitely set this property to NO.
  • ListenerSpeed – A number value for how fast you want listeners in the scene to run. The default is 0.25 or every quarter-second. Raise or lower to your liking. All Listeners fire once immediately, then begin using this speed afterwards. The lowest you should set this value is 0.02, but thats probably overkill.
  • AnimateNodeToSlotTime – An number value for the time it takes for nodes to animate to a slot. The default value is 1. Only used in conjunction with the AnimateNodeToSlot event. This time value has no effect on anything else.
  • AnimateNodeToNodeTime –  An number value for the time it takes for nodes to animate to a node. The default value is 1.  Only used in conjunction with the AnimateNodeToNode event. This time value has no effect on anything else.
  • AnimateNodeToInventorySlotTime –  An number value for the time it takes for nodes to animate to a designated Inventory Slot. The default value is 1.  Only used in conjunction with the AnimateNodeToInventorySlot event. This time value has no effect on anything else.
  • AnimateNodeToPathTime – An number value for the time it takes for nodes to animate to the next designated path point. The default value is 1.  Only used in conjunction with the AnimateNodeOnPath event. This time value has no effect on anything else.
  • FlushSavedValues – A Bool value. Setting YES will clear ALL saved values in the app. CAUTION this will remove all values in the NSUserDefaults, essentially resetting the app, including any saved defaults for purchases. Not recommended if you have in-app purchases, especially Consumables.
  • PairingSensitivity – A number value (either 0, 1, 2, or 3) to set how sensitive the kit is in detecting puzzle style pairing (only applies if there is an Event Listener for pairing setup). 0 uses the entire width and height of the image, assume puzzle piece, when checking the intersection of the puzzle and base position. 3 only uses a fraction of the width and height making the puzzle pairing more exact.
  • IntersectionSensitivity –  A number value (either 0, 1, 2, or 3) to set how sensitive the kit is in detecting intersections (only applies if there is an  Event Listeners setup). 0 uses the entire width and height of the image  when checking the intersection of the other element’s position. 3 only uses a fraction of the width and height making the intersection detection more exact.
  • RemovePhysicsBodyOnPairing – A YES or NO value to remove a physics body on the puzzle piece being paired to a base. (only applies if there is an Event Listener for pairing setup and the puzzle piece has a physics body)
  • MaxPanX – A number value. This is the max speed that panning gestures can move objects on the X axis. This is particularly useful if the camera itself is going to be panned.
  • MaxPanY – A number value. This is the max speed that panning gestures can move objects on the Y axis. This is particularly useful if the camera itself is going to be panned.
  • EaseOutPanning – a Bool value. Set YES and panning gestures will be eased out (continued slightly after the user has stopped touching the screen).



Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!