Skip to content

Commit

Permalink
Adds a -draggingEntered: method for the delegate to implement
Browse files Browse the repository at this point in the history
  • Loading branch information
pieteromvlee committed Jul 28, 2011
1 parent 8263203 commit 855285d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions BCCollectionView+Dragging.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions BCCollectionViewDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 855285d

Please sign in to comment.