Search code examples
iosipadaqgridview

Create grid of different sized thumbnails?


I'm trying to display a set of image thumbnails in a grid on the iPad. I'm able to display a grid of images that are all 100x100 using AQGridView but I would like to include some images that are 200x200 (essentially, 4 spots in the grid).

For example, displaying 8 100x100 images and one 200x200 image like:

[1] [2] [3] [4]
[  5  ] [6] [7]
[     ] [8] [9]

Is there a way for AQGridView to do this? Or other frameworks that have this type of functionality?

If not, perhaps someone can suggest a strategy that has been successful for them?


Solution

  • AQGridView's sample on reorganizing a springboard shows how to insert empty cell indexes to create the illusion of space. Just insert 4 empty cells into the matrix and overlay a UIView, or implement some kind of flag that sets the cell's transform property to CGAffineTransformMakeScale(2.0, 2.0); on a regular cell.