I want to add space between the cells that I have in my UITableView
.
Here's my code. What I mean is cell then space then cell then space etc.
class TableViewController: UITableViewController {
var textArray = [String]()
var cellsArray = ["1","2","3"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
textArray = ["","",""]
self.tableView.estimatedSectionHeaderHeight = 80
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return textArray.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: (cellsArray[indexPath.row]), for: indexPath) as UITableViewCell
return cell
}
}