Create image grid using UITableView in ios

Here I need a grid layout to create a photo album similar to the page, but on this page I have thousands of images, so I use uitableview

+4
source share
2 answers

create a custom cell extending the UITableViewCell .

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

+3
source

GridView can be done using UITableView . One way you can do this is to create a custom UITableViewCell and have 2 images with tags 1 and 2. So when you access this view in cellForRowIndex... you can extract that image and populate ...

You can do it, or you can use what others have already done -

how to create and create a gridview using a UIScrollView or a UITableView

How to create a gallery on iOS

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

+6
source

Source: https://habr.com/ru/post/1399717/


All Articles