How to give space between two cells in tableview?

前端 未结 26 1461
谎友^
谎友^ 2020-11-29 00:11

I want a space between two cell in table view,

I want cell like this,

\"enter<

26条回答
  •  醉梦人生
    2020-11-29 00:43

    For spacing between cells like the ones in your screenshot, there is no need for custom cells (for their look anyway, like the gradient bkg and so on, this could anyway be a good idea, but this won't help for your spacing between cells)

    To achieve this kind of spacing, simply use different sections in your UITableView.

    [EDIT] Everything is explained In Apple's TableView Programming Guide (and that's worth reading it, as it contains a lot of stuff you should know about tableviews)

提交回复
热议问题