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

Question about refreshTableSections:oldSections and row insertion animations #89

Open
txaiwieser opened this issue Sep 11, 2016 · 0 comments

Comments

@txaiwieser
Copy link
Contributor

txaiwieser commented Sep 11, 2016

First, thanks for sharing this framework, its really great!

Have a question for you all. I was looking into the code framework to see how it would be the best way to animate the rows insertions and found that there is a private method called refreshTableSections:oldSections, with a default argument nil.
This functions has a guard statement that always calls reloadData() if the argument is nil.

All the places that call refreshTableSections in the framework call it with the default argument nil, never passing the oldSections. So the function never runs completely and as a private function I can't cal it from outside.

It this right? how can i refresh only some rows, to animate insertion?

Thanks!

private func refreshTableSections(oldSections: [Section]? = nil) {
        guard let tableView = tableView else { return }
        guard let oldSections = oldSections else {
            tableView.reloadData()
            return
        }
        ...

Thanks! 👍

@txaiwieser txaiwieser changed the title private func refreshTableSections(oldSections: [Section]? = nil) { guard let tableView = tableView else { return } guard let oldSections = oldSections else { tableView.reloadData() return } Question about refreshTableSections:oldSections and row insertion animations Sep 11, 2016
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

1 participant