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

More interaction with supplementary views. #128

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

Conversation

kmisiura
Copy link

Added delegate messages about supplementary views being added and removed from document view:
- (void)collectionView:(JNWCollectionView *)collectionView
willDisplaySupplementaryView:(JNWCollectionViewReusableView *)supplementaryView
                ofKind:(NSString *)kind
            forsection:(NSInteger)section;

- (void)collectionView:(JNWCollectionView *)collectionView
didEndDisplayingSupplementaryView:(JNWCollectionViewReusableView *)supplementaryView
                ofKind:(NSString *)kind
            forsection:(NSInteger)section;
Implemented methods to get visible supplementary views:
- (NSArray *)visibleSupplementaryViews;

- (NSArray *)visibleSupplementaryViewsForKind:(NSString *)kind;

@@ -354,6 +358,17 @@ - (void)resetAllCellsAndSupplementaryViews {
}
}
[self.visibleCellsMap removeAllObjects];

if (_collectionViewFlags.delegateDidEndDisplayingSupplementaryView)
{
Copy link
Owner

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.

@jwilling
Copy link
Owner

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!

spilliams and others added 7 commits December 22, 2014 15:19
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.
@kmisiura
Copy link
Author

Sorry for taking this long. Cleaned up code and merged from head.

@kmisiura kmisiura closed this Dec 22, 2014
@kmisiura kmisiura reopened this Dec 22, 2014
@@ -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:)];
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants