Multiple layers solution gives each page most potential chance to become special and unique. In this tutorials, we will show you how to work with multiple image layer and page zoom/scroll property, check the tutorial video first:
If you are not familiar with image layer or page layer for Dolphin App Template, check these two tutorials first:
Ok, when you get familiar with image and page tags, let’s continue. There is already a multiple layer usage demo in the Dolphin App Template project folder, you can test “multiple_layer_demo.xml” showed as below, which is in DolphinViewController.m
The demo in “multiple_layer_demo.xml” is very similar with the demo video you watched here. You can click small image on the first page, and they will jump to the target page they have been set in the XML. The xml define for such function is like below, very easy to be understand:
Enough easy, right? Just add more layers you want within the page tag, if you want your specific image layer jump to certain page, set the target_page_id, otherwise, set the value with -1, or just delete target_page_id tag.
For each page’s own scroll and zoom property, it’s also easy to be understand, if you set page’s own zoom&scroll value, they will use their own, otherwise, the use global value for page zoom and scroll.<page_prop> <single_page_zoom_min>1</single_page_zoom_min> <single_page_zoom_max>2</single_page_zoom_max> <scroll_width>1024</scroll_width> <scroll_height>1280</scroll_height> </page_prop>
Both page and image have scroll_width and scroll_height property, but they have different meaning. Page’s scroll value means its movable area while image layer’s means its limit area. See below image for detail explanation:
The own scroll value provide your app more flexible use, for example, on one page, your left image be a static one, and right one is a long one that could move vertically.
By using these specific arguments for page and layer, your app will look different than a simple slideshow.