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

Move to beginning / end #174

Merged
merged 3 commits into from
Jun 7, 2016
Merged

Conversation

kettch
Copy link
Contributor

@kettch kettch commented Jun 1, 2016

Adding support for moveToBeginningOfDocument / moveToEndOfDocument

@@ -429,6 +429,30 @@ - (NSArray *)allIndexPaths {
return indexPaths.copy;
}

- (NSIndexPath *)firstIndexPath {
NSIndexPath *indexPath = nil;
Copy link
Owner

Choose a reason for hiding this comment

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

I wonder if this method can be simplified to something like this?

if ([[self numberOfItemsInSection:0] > 0) {
    return [NSIndexPath jnw_indexPathForItem:0 inSection:0];
}

return nil;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, updating it.

@jwilling
Copy link
Owner

jwilling commented Jun 7, 2016

Thanks. 🍨 Just a couple of comments if you don't mind!

@jwilling
Copy link
Owner

jwilling commented Jun 7, 2016

Awesome! Thanks. 👍

@jwilling jwilling merged commit e0e8634 into jwilling:master Jun 7, 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

Successfully merging this pull request may close these issues.

2 participants