0

I'm using aqgridview to create a book-shelf like UI.

I can place image and title for image fine (with the ImageDemo example provided in aqgridview).

I want to place 'shelf' image where the image title is. (as in http://itunes.apple.com/ca/app/rivet-for-ipad/id375055319?mt=8)
I can set the background color of the label for title but the shelf background image won't be there where there's no cell in the first place.
Hence shelf image doesn't cover the entire screen width.

How can I stretch the shelf image?

Thank you

mackworth
  • 5,873
  • 2
  • 29
  • 49
eugene
  • 39,839
  • 68
  • 255
  • 489

1 Answers1

1

i'm also using AQGridView for a book grid with shelves, i found the best and fastest way to do this is simply use a UITableView.

Create a UITableView and add the shelves images as rows (Configure UITableViewCell) Set the AQGridView backgroundView to the UITableView _gridView.backgroundView = _tableView

you can use - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { to use different shelf graphics for different shelfes

but i'm guessing you already found way by now.

Yogev Shelly
  • 1,373
  • 2
  • 13
  • 24
  • I got a problem here, the `setBackgroundView:` way worked. But after I called `reloadData` from AQGridView the tableview seems override the gridview, as result what I am currently scrolling is tableview . Any ideas? – Lunayo Mar 14 '12 at 11:08
  • Now the gridview seems doesn't scroll at all, I think it is the cause of the current top view is tableview. This is only happened after calling `reloadData`. Did you addSubView the tableview to the self.view? – Lunayo Mar 14 '12 at 11:18
  • [(UITableView*)gridBackgroundView setUserInteractionEnabled:FALSE]; – Yogev Shelly Mar 14 '12 at 11:18