I'm relatively new to swift and iOS. How can I implement than app that looks like the updated instagram. : the first row has a collection of height x, but the rest of the cell have image views of height x+y
. Checkout what I mean in this image, my rep is too low to upload an image. Lol :)
Asked
Active
Viewed 78 times
-2

Haris Qurashi
- 2,104
- 1
- 13
- 28

user3723372
- 11
- 4
-
Possible duplicate of [Different cell size in UICollectionview](http://stackoverflow.com/questions/16061804/different-cell-size-in-uicollectionview) – Feb 07 '17 at 01:54
2 Answers
1
Implement the UITableView's delegate method func tableView(UITableView, heightForRowAt: IndexPath)
Then you can return any height for each indexPath
. The easiest option would be to make that its own section, and then the rest of the same sized rows another section.

dmorrow
- 5,152
- 5
- 20
- 31
0
if your cells' height are different, you should in the methord func tableView(UITableView, heightForRowAt: IndexPath)
make sure the height of cell according to the modal for the cell.

JackXu
- 1
- 2