Skip to content

Don't assert indexForCell: API when cell isn't visible#824

Closed
rnystrom wants to merge 1 commit into
masterfrom
index-for-cell-nil
Closed

Don't assert indexForCell: API when cell isn't visible#824
rnystrom wants to merge 1 commit into
masterfrom
index-for-cell-nil

Conversation

@rnystrom
Copy link
Copy Markdown
Contributor

Noticed this randomly debugging. Say you have a completion block that finishes after some async task happens. If you scroll the cell off screen it will return nil for -[UICollectionView indexPathForCell:], and the assert will fail (unless the SC is at 0). Quiet some asserts.

Copy link
Copy Markdown
Contributor

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌮

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@rnystrom has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@rnystrom rnystrom deleted the index-for-cell-nil branch August 9, 2017 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants