I have created a UIview
class Xib
to display it in footer view of my table.
import UIKit
/// This class is to display footer view in a settings table view
class FooterView: UIView {
override func awakeFromNib() {
super.awakeFromNib()
}
}
I'm displaying it as below:
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = FooterView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 140))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 100
}
What's wrong with this? I'm not able to see the footer view and getting so much space between the tableview
rows.