slackhq / SlackTextViewController

⛔️**DEPRECATED** ⛔️ A drop-in UIViewController subclass with a growing text input view and other useful messaging features
https://slack.com/
MIT License
8.32k stars 1.08k forks source link

Custom section header not appearing #86

Closed andriyslyusar closed 9 years ago

andriyslyusar commented 9 years ago

I am trying to add custom section headers to tableView

My class

class ViewController: SLKTextViewController, UITableViewDelegate, UITableViewDataSource {
// code
}
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
// create and return view. But this code never get called ???
}
override func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
// return height of view
}

As a result tableView:viewForHeaderInSection: never get called. Do you have any ideas why it can happen?

dzenbot commented 9 years ago

I tried it with the sample project, and viewForHeaderInSection: is successfully called. Probably best to share a gist of all your implementation to see what's wrong.

Are you using inverted = true?

andriyslyusar commented 9 years ago

Ignacio, thanks a lot for your time. It was my mistake in resetting delegate method by other controller.