The MacImage Gallery Gallery was derived from the original buzztouch v1.5 image gallery.
It displays a list of interactive images. Images can be included in the compiled project
or they can come from URL's. It's also common to place a .PHP
script in a remote folder of images (on a website) that reads the directories contents
then outputs the JSON data for the image gallery. In this case, you do not enter images
manually in the control panel but instead you use the dataURL advanced property.
VERSIONS
------------
Vers 1.8
6/23/2017
Added Android functionality
Vers 1.7 06/20/2017
Updated for Buzztouch 4.0
Vers 1.6 03/15/2014
Status bar transparency issue fixed.
Minor tweaks
Vers 1.5 01/03/2014
Missing navigation icons added
Toolbar cleaned and updated
Vers 1.4 11/28/2013
Adjustments to accomodate iOS7
Modified control panel components to use the newer JSON management approach.
Vers 1.3, no update notes.
Vers 1.2 05/03/2013
Added support to hide the bottom tab bar when the screen loads. This is
the "hideBottomTabBarWhenScreenLoads" property in the advanced settings.
No notes for version 1.0 and 1.1
iOS Project
------------------------
6 Objective-C classes (a total of 12 files) are needed.
Mac_image_gallery.m and .h
Mac_imageDecompress.m and .h
Mac_imageViewTap.m and .h
Mac_photo.m and .h
Mac_viewTap.m and .h
Mac_zoomingScrollView.m and .h
Mac_screen_image.m is the main UIViewController that shows the list of images. All the
other objective c classes are used to support scrolling, swiping, zooming, pinching,
double tapping and other complicated gallery behaviors.
Android Project
------------------------
This plugin does not support Android.
JSON Data
------------------------
The JSON data for the image gallery includes a child items array holding individual
image items like the sample below. NOTE: The first two images in the list use an
imageName and the third image uses an imageURL. Each image uses an imageName OR an
imageURL, not both. If you use an imageURL, the image must be compiled in the project.
{
"itemId":"1111",
"itemType":"Mac_image_gallery",
"itemNickname":"Image Gallery",
"navBarTitleText":"My Image Gallery",
"childItems":[
{
"itemId":"img_1",
"itemType":"MacImageItem",
"imageTitle":"Image 1 Caption",
"imageName":"image1.png"
},
{
"itemId":"img_2",
"itemType":"MacImageItem",
"imageTitle":"Image 2 Caption",
"imageName":"image2.png"
},
{
"itemId":"img_3",
"itemType":"MacImageItem",
"imageTitle":"Image 3 Caption",
"imageURL":"
http://www.mysite.com/images/image3.png"
}
]
}
If you provide image data from a remote file there is no childItems array. Instead,
the images are pulled from a remote file then added to the gallery.
{
"itemId":"1111",
"itemType":"Mac_image_gallery",
"itemNickname":"Image Gallery",
"navBarTitleText":"My Image Gallery",
"dataURL":"
http://mywebsite.com/imagesForGallery.php"
}
In this case the images would come from a backend script at the dataURL. Loading
the dataURL in your browser would produce output like this....
{
"childItems":[
{
"itemId":"img_1",
"itemType":"MacImageItem",
"imageTitle":"Image 1 Caption",
"imageName":"image1.png"
},
{
"itemId":"img_2",
"itemType":"MacImageItem",
"imageTitle":"Image 2 Caption",
"imageName":"image2.png"
},
{
"itemId":"img_3",
"itemType":"MacImageItem",
"imageTitle":"Image 3 Caption",
"imageURL":"
http://www.mysite.com/images/image3.png"
}
]
}