Handle different styles with UITableView

Hello,


Here in the screenshot of the Home app,

https://image.noelshack.com/fichiers/2018/33/2/1534239914-img-2568.jpg

There is differents UIView's but I have totally no idea how I can do this, maybe somebody can help by explaining me what kind of UIView I have to use ?


Thanks in advance 😉

Replies

How do you know "Accessories" is not tableViewCell ?


You can define your own prototype cells exactly as you want, and have several prototypes in a tableView (probably the case here).


Whatis it you don't succeeed to do ? What is the code you have written so far ?

Each view for a cell should be a UITableViewCell.


You can:

- create a new file

- select Cocoa Touch Class

- select subclass of UITableViewCell

- name it (such as AccessoryCell)

- select to create xib


You will get 2 files, a xib and a swift file.


You will have to register the cell to the tableView, create the xib content in IB, connect it to outlets in the swift foile.


Then write code so that it does what you want.