-
Notifications
You must be signed in to change notification settings - Fork 85
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
More interaction with supplementary views. #128
base: master
Are you sure you want to change the base?
Conversation
…ewsForKind:" methods
…iew messages to JNWCollectionViewDelegate protocol
@@ -354,6 +358,17 @@ - (void)resetAllCellsAndSupplementaryViews { | |||
} | |||
} | |||
[self.visibleCellsMap removeAllObjects]; | |||
|
|||
if (_collectionViewFlags.delegateDidEndDisplayingSupplementaryView) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we could get these brackets on the previous line? Same for the other brackets in the diff.
Thank you for putting this together, your contribution is much appreciated. ✨ Just a few pedantic comments. Also, it looks like this might need a merge from head to pull cleanly. Thanks! |
Index paths are used with other Cocoa classes, and may contain more than 2 items. The default implementation of -isEqual should already handle the 2-item case correctly.
If a version that displays the section and item is needed, it should probably have a unique name. Messing with NSIndexPath globally can cause unexpected results elsewhere.
Sorry for taking this long. Cleaned up code and merged from head. |
@@ -138,13 +143,16 @@ - (void)setDelegate:(id<JNWCollectionViewDelegate>)delegate { | |||
_collectionViewFlags.delegateDidDeselect = [delegate respondsToSelector:@selector(collectionView:didDeselectItemAtIndexPath:)]; | |||
_collectionViewFlags.delegateDidDoubleClick = [delegate respondsToSelector:@selector(collectionView:didDoubleClickItemAtIndexPath:)]; | |||
_collectionViewFlags.delegateDidRightClick = [delegate respondsToSelector:@selector(collectionView:didRightClickItemAtIndexPath:)]; | |||
_collectionViewFlags.delegateDidEndDisplayingCell = [delegate respondsToSelector:@selector(collectionView:didEndDisplayingCell:forItemAtIndexPath:)]; | |||
_collectionViewFlags.delegateDidEndDisplayingCell = [delegate respondsToSelector:@selector(collectionView:didEndDisplayingCell:forItemAtIndexPath:)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It seems like there's still a merge conflict. Can you run it through mergetool one more time? For me, the conflict happens right here. Sorry for the trouble!
Added delegate messages about supplementary views being added and removed from document view:
Implemented methods to get visible supplementary views: