I'm currently playing with NSCollectionView (10.11+ behavior) and have not been able to figure out a mystery when it comes to drag and drop.
I have a NSCollectionView with a custom layout. The layout is based on the standard grid layout with the following modifications in mind: - there can only be one row. - there are as many columns as items. - the collection view can be scrolled horizontally. - the width of the items is fixed. - the height of the items is the height of the contents. The mystery I'm facing is that during a local drag and drop (to switch items), the vertical line indicating the target of the drop does not appear. The mysterious side here is that if I change the maximumNumberOfRows to 0, it does appear but I lose the horizontal scrolling. Since this is the first time I try to use the NSCollectionView class with a custom layout, I'm probably doing something wrong. But I have not found so far an obvious solution from the miscellaneous tutorials here and there. So if anyone has an idea what's wrong, I'm interested. Sample project: Warning: the drop indexes are computed incorrectly for the moment. Dragging and dropping the first card between the second and third ones is safe. https://drive.google.com/file/d/1LsDrWjK7vg3ET8yGLaLR1OpojfA4Tlrr/view?usp=sharing _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com