Reputation: 1901
I used checkbox and switches in my custom tableview cell. But as shown in the image i need to place the header at the proper place above the checkbox and switch.
How should i suppose to do this.
Thanks in advance.
Upvotes: 1
Views: 88
Reputation: 1521
Follow these steps for achieving your task.
UITableViewController
to your storyboard
UITableView
headerCell
and second cell identifier take as listCell
controller click on right label
and drag it to first cell and set it to vertical center
.listCell
see the image and set all constraint as shown in image. Upvotes: 1
Reputation: 3499
You would probably need a custom tableview header as well.
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return YOUR_CUSTOM_HEADER_VIEW
}
Upvotes: 1