Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Image Grid using UITableView in ios

Here i need the grid layout for creating similar to the photo album page,But in that page i am having thousands of images so that, i am using uitableview

like image 942
dineshprasanna Avatar asked Jan 17 '23 07:01

dineshprasanna


2 Answers

GridView can be done using UITableView. One way u can do it is have a custom UITableViewCell & have 2 imageViews with tag 1 & 2. That way when u access that view in cellForRowIndex... you can extract that imageView & populate...

You can do this or u can use what others have already done -

how to design and create a GridView using UIScrollView or UITableView

How To Create A Gallery on iOS

https://stackoverflow.com/questions/6430012/ios-grid-view-with-section-headers

like image 160
Srikar Appalaraju Avatar answered Jan 28 '23 14:01

Srikar Appalaraju


create a custom cell extending UITableViewCell.

Add UIImageView to it. assign images on - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

like image 41
Mitul Nakum Avatar answered Jan 28 '23 15:01

Mitul Nakum