Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a grid view on iOS

Tags:

ios

I need to implement a grid view with dynamically-changing images.

Most of the time, I use a UITableView to create a grid, but I run into memory issues if I have a large number of images.

In iOS 6, the UICollectionView was added, but I've never used it before.

What are some "best practices" and view subclasses to use when making a grid view so I don't have memory issues?

like image 909
ekant Avatar asked Jul 22 '13 20:07

ekant


People also ask

How do I create a grid in SwiftUI?

How to use SwiftUI Grid. To use Grid , you populate a grid with GridRow structures. Each GridRow child views represent each cell/column in a grid view. In the following example we created a 2x2 grid (two rows and two columns).

What is Lazyvgrid?

A container view that arranges its child views in a grid that grows vertically, creating items only as needed.


2 Answers

Late to the party, but we have opensourced our commercial datagrid component and its free to use!

https://github.com/flexicious/iOSDataGrid

Its actually quite versatile in what it can do as compared to most libraries listed above.

http://www.ioscomponents.com/Home/IOSDataGrid

like image 167
flexicious.com Avatar answered Sep 20 '22 20:09

flexicious.com


I would go with UICollectionView as you said. You can actually see this answer I gave, where you can see already made libraries.

like image 30
Rui Peres Avatar answered Sep 20 '22 20:09

Rui Peres