TableView header section disappear swift
Problem:
I had tried the following code for tableview header for cell reused but sometimes the header disappears.
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let myCell = table.dequeueReusableCell(w
return myCell
}
Solution:
You can use the below code to solve the issue.
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let myCell = table.dequeueReusableCell(w
return myCell.contentView // This line changes for solving
}
Comments
Post a Comment