How do I automatically add labels to a UICollection in Swift?

1

In my application I was able to use the UICollection to display a horizontal scrolling "table" containing the purchase information of the client with header, but now I have another question, I need this table to be fed with each new password added. With the UICollection, I have added 2 labels, one with the header (CPF, NAME, etc), another with the information of the call on the server for each password chosen, that is, if the user buys a password and before closing the request choose one more password, the table should contain the header and two more lines with the information of the passwords (plus a label), as I add lines automatically in the UICollection as in a tableView, as the information array (number of passwords) grow up? Here is an image of the table that is working but needs to be fed:

    
asked by anonymous 17.11.2015 / 23:03

1 answer

0

I do not know if this is what you want, but to put a UITableView inside a UICollectionView. The side navigation is by the CollectionView and within each tab you put the TableView with a section and N lines, added dynamically as needed.

Here is a sample code in Objective C for which I commented, only adding the section as grouped to function as a header. link

    
19.11.2015 / 11:57