1.UITableViewで表示するセルの数が少ない場合,余分な横線を削除する方法:
tableView.tableFooterView = UIView()
2.UITableViewで高さの設定
cellの高さの設定
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 68
}
sectionの高さの設定
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 68
}
UITableViewのCellの高さを自動調整してくれるUITableViewAutomaticDimension
tableView.estimatedRowHeight = 68
tableView.rowHeight = UITableViewAutomaticDimension