Skip to content
Browse files

Adds a -draggingEntered: method for the delegate to implement

  • Loading branch information...
1 parent 8263203 commit 855285de3263d6e023961951961ebfe46eaab1e7 @pieteromvlee pieteromvlee committed Jul 28, 2011
Showing with 8 additions and 4 deletions.
  1. +7 −4 BCCollectionView+Dragging.m
  2. +1 −0 BCCollectionViewDelegate.h
View
11 BCCollectionView+Dragging.m
@@ -45,10 +45,13 @@ - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDra
[self autorelease];
}
-//- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender
-//{
-// return [self draggingUpdated:sender];
-//}
+- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender
+{
+ if ([delegate respondsToSelector:@selector(collectionView:draggingEntered:)])
+ return [delegate collectionView:self draggingEntered:sender];
+ else
+ return [self draggingUpdated:sender];
+}
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
{
View
1 BCCollectionViewDelegate.h
@@ -59,6 +59,7 @@ enum {
performDragOperation:(id <NSDraggingInfo>)draggingInfo
onViewController:(NSViewController *)viewController
forItem:(id)item;
+- (NSDragOperation)collectionView:(BCCollectionView *)collectionView draggingEntered:(id <NSDraggingInfo>)draggingInfo;
- (void)collectionView:(BCCollectionView *)collectionView draggingEnded:(id <NSDraggingInfo>)draggingInfo;
- (void)collectionView:(BCCollectionView *)collectionView draggingExited:(id <NSDraggingInfo>)draggingInfo;

0 comments on commit 855285d

Please sign in to comment.
Something went wrong with that request. Please try again.