Q: Controling a Gallery With Javascript
I would like to use a Boolean array to control the images in a gallery. Each index in the array would correlate to a specific image, which would not appear in the gallery if array[i] == false, but the image would appear if array[i] == true.
I could use some help with controlling the gallery. Is there a way to do the following?
Access a specific slide at an index via javascript.
Get the number of slides in the gallery via javascript.
Add/remove slides to/from the gallery via javascript.
Set the image path for a given slide via javascript.
It seemed to me like such information should be here:
However, I think I must be missing something. If anyone could point me in the right direction, I would appretiate it!
Thanks,
Robbie
Posted on Feb 13, 2014 2:22 PM
Hey Robbie,
You'll see at the top of that doc a mention that the Gallery View (and all the other multi-cell objects) implement the Cell Container protocol. Check out the details on the protocol and post back any question you may have - I think you'll find it pretty straight forward.
There was also as WWDC '13 session that demoed the standard Cover Flow object (also implements Cell Container protocol) using dynamic content fetched from a JSON feed.
Cheers,
-Mark
Posted on Feb 15, 2014 10:19 AM
