I have an UITableView with a grouped style.
I want to populate this table from an array of objects. Let's say
class User {
var name : String!
var age : Int!
var group : String!
}
User with same group values must be in the same section of my UITableView. To do that, I planed to transform my array to a dictionary with the group as key and an array of the corresponding objects in value but the UITableView request the value via IndexPath and I did't find an easy way to get an hash value by index.
How could I resolve this problem in an elegant way ?