Skip to content

Fix compatibility with AsyncDisplayKit #12

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sstigler
Copy link

@sstigler sstigler commented Oct 9, 2016

This fixes an NSInternalInconsistencyExceptionn that occurs when using SFFocusViewLayout with AsyncDisplayKit. The commit message has more details.

AsyncDisplayKit was requesting a layout before the collection view had items (or sections). That led to a crash because the `numberOfItems` computed property was querying the collection view for the number of items in non-existent section 0. This fix updates the `numberOfItems` computed property to always return 0 if there aren’t any sections in the collection view.
@sstigler
Copy link
Author

sstigler commented Oct 9, 2016

@fdzsergio Looks like CircleCI is failing; is that something you can fix? It says "Please select an OS X plan."

@codecov-io
Copy link

codecov-io commented Oct 9, 2016

Current coverage is 100% (diff: 100%)

No coverage report found for master at f841b02.

Powered by Codecov. Last update f841b02...cff2cfd

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.

3 participants