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

Scroll once when waiting for UITableViewCells #1141

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

zradke
Copy link
Contributor

@zradke zradke commented Mar 17, 2020

Previously we would call UITableView.scrollToRow(at:at:animated:)
every runloop while we waited for the scroll to complete. This caused
multiple unnecessary calls to the delegate's
scrollViewDidEndScrollingAnimation(_:) method. This change resolves
the issue by moving the call to scroll to the row outside of the
KIFTestActor.run(_:) block.

Previously we would call `UITableView.scrollToRow(at:at:animated:)`
every runloop while we waited for the scroll to complete. This caused
multiple unnecessary calls to the delegate's
`scrollViewDidEndScrollingAnimation(_:)` method. This change resolves
the issue by moving the call to scroll to the row outside of the
`KIFTestActor.run(_:)` block.
@zradke
Copy link
Contributor Author

zradke commented Mar 17, 2020

I also noted that the implementation of the UICollectionView's wait for cell method differs in it's implementation such that it doesn't do the incremental waiting and just waits for 0.5seconds. Not sure if I should update one or the other to match.

@justinseanmartin
Copy link
Contributor

I'd recommend leaving the collection view as is for now unless there is something specific that it is breaking and we can determine that the change is safe.

@justinseanmartin justinseanmartin merged commit ecfc02d into kif-framework:master Mar 19, 2020
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

Successfully merging this pull request may close these issues.

2 participants