user4933792
user4933792

Reputation:

xcode - TableView rows from bottom to top

For my little project, I need you help. I already created a functioning table view. Now I want that the rows goes from bottom to top and not like usually from top to bottom. How do I do that?

Upvotes: 1

Views: 5553

Answers (3)

Gulfam Khan
Gulfam Khan

Reputation: 1089

The most simple solution, you can use array.reversed() to show the last object of the array at the top of tableview

Upvotes: 0

Crashalot
Crashalot

Reputation: 34523

If you can target iOS 6+, this answer suggests using UICollectionView to lay out rows in reverse order: https://stackoverflow.com/a/23895000/144088.

Upvotes: 0

Simon Degn
Simon Degn

Reputation: 968

First you rotate your UITableView 180 degrees upside down, and then rotate your individual cells also upside down.

Take a look: UITableView anchor rows to bottom

Upvotes: 9

Related Questions