Popular questions for this item

How can I add the “gallery module” in my project?

1. Drag and drop “ImageShow.h” and “ImageShow.m” in your project folder.

2. Please click right your project folder and select “New File… -> Resource -> Property List” or drag and drop “gallery.plist” file in your project folder

If you named your Plist extension file different from “gallery” edit the 24. and 26. lines which are in “ImageShow.m”

3. Import “ImageShow.h” on your gallery page.

#import "ImageShow.h" 
    @interface YourGalleryViewController : UIViewController{

4. Copy and paste the following lines in your gallery view controller implementation

----- Copy and Paste in your class viewDidLoad ----
    ImageShow *showImage    = [[ImageShow alloc] init];

    for (int i=1; i<(showImage.smallIMG.count); i++) {

        //Create Button
        UIButton *imageBT   = [[UIButton alloc] initWithFrame:CGRectMake(imageX, imageY, 84, 84)];

        // Get Thumbnails images
        [imageBT setImage:[UIImage imageNamed:[showImage getSmallImage:i]] forState:UIControlStateNormal];      
        imageBT.tag = i;

        // Create Event
        [imageBT addTarget:self action:@selector(imgOpen:) forControlEvents:UIControlEventTouchUpInside];

        [self.view addSubview:imageBT];

        //Set Position
        imageX  +=100;
        if ((i % 3) == 0) {
            imageX  = 20;
            imageY  += 90;
----- Copy and Paste in your class viewDidLoad ----