Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom section header view not working. #36

Open
DavidTomic opened this issue Jun 4, 2018 · 3 comments
Open

Custom section header view not working. #36

DavidTomic opened this issue Jun 4, 2018 · 3 comments

Comments

@DavidTomic
Copy link

Hi,

If I use method for custom section header view than header is not presented properly:

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?

Can you provide me instructions what should I do to make this work, thank you.

@ridvank
Copy link

ridvank commented Jun 25, 2018

Any solution on this issue?

@dufflink
Copy link

Hi! You can use 'viewForFooterInSection' method in UITableViewDelegate and added UILabel().

func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let label = UILabel()
label.text = messages.sectionInfoAtIndex(section).name
label.textColor = UIColor.white.withAlphaComponent(0.4)
label.center = tableView.center
label.font = UIFont.boldSystemFont(ofSize: 10)
label.textAlignment = .center
return label
}

It's work for me

@toshi0383
Copy link
Contributor

@dufflink It works except for the section index NOT reversed, right?
fyi: #58 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants