Home:ALL Converter>iOS Swift - Use UICollectionView for datalist

iOS Swift - Use UICollectionView for datalist

Ask Time:2014-09-12T15:52:01         Author:mdcore

Json Formatter

I started iOS app development a couple of days ago and I need some advice how to implement a requirement. I lost a bet with my friends and they want me to develop an app for them. I never did this on iOS devices. So I started to read some apple documentations and decided to try it with swift and xcode6 - beta.

I need to display some data in multiple columns and rows. But it depends on a selection which was made (minimum three columns, maximum five). Its like displaying data which are saved in a table.

My question: Which view should I use for this requirement? First I thought to use UITableView but I have read that UICollectionView would be better?! The cells should only act as an "label". No functions behind the cells are required. Its just showing data on screen (actually only numbers). The row-count will be between 5 and 50 rows.

Something like this:

|Header Col 1| Header Col 2| Header Col3|...up to 5|
     30            30           30           .....
     22            27           21           .....
     27            37           32           .....
     12            29           25           .....
     32            9            30           .....

Any hints?

Author:mdcore,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25803371/ios-swift-use-uicollectionview-for-datalist
yy