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

ios 15 calculates sectionForHeaderView wrong #55

Open
ademcayir opened this issue Feb 21, 2022 · 1 comment
Open

ios 15 calculates sectionForHeaderView wrong #55

ademcayir opened this issue Feb 21, 2022 · 1 comment

Comments

@ademcayir
Copy link

FZAccordionTableView.sectionForHeaderView method works wrong for first header. Somehow, [self rectForHeaderInSection:middleSection] in sectionForHeaderView returns a minor floating origin.y for first section. so, when user taps on first header, sectionForHeaderView returns NotFound, and it crashes in app in next line

@vsavvos
Copy link

vsavvos commented Nov 1, 2022

Hello adem. The answer to your problem is: Put that code on view did load
if (@available(iOS 15.0, *)) {

    self.tableView.sectionHeaderTopPadding = 0.0 ;
} else {
    // Fallback on earlier versions
}

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

2 participants