How can I add a top margin to my tableview in Xcode? How can I add a top margin to my tableview in Xcode? xcode xcode

How can I add a top margin to my tableview in Xcode?


I am not sure if I understand your question, if you are trying to have a margin between your table and the view try this:

Swift 3

self.tableView.contentInset = UIEdgeInsets(top: 20,left: 0,bottom: 0,right: 0)

Swift 2

self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);