OS X sierra 10.12 では、NSTabView でドラッグ アンド ドロップが正しく機能しません....ドラッグ アンド ドロップは、タブ全体ではなく、TabView のラベルでのみ機能するようです..次のプロジェクト サンプルで確認できます...コードをダウンロードするか、 こちらコードです:-NSTabView のサブクラスAppMainTabSetを作成し、このクラスを Interface Builder で TabView のカスタム クラスとして使用します.....
#import "AppMainTabSet.h"
@implementation AppMainTabSet
- (id)initWithCoder:(NSCoder *)coder
{
/*------------------------------------------------------
Init method called for Interface Builder objects
--------------------------------------------------------*/
self=[super initWithCoder:coder];
if ( self ) {
}
return self;
}
- (void)awakeFromNib{
[self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
}
-(NSDragOperation) draggingEntered:(id < NSDraggingInfo >)sender
{
NSLog(@"Hello Hello....draggingEntered");
return NSDragOperationGeneric;
}
- (void)draggingExited:(id <NSDraggingInfo>)sender {
NSLog(@"**** draggingExited*****");
}
- (BOOL) prepareForDragOperation:(id <NSDraggingInfo>)sender {
NSLog(@"Hello Hello....prepareForDragOperation");
return YES;
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSLog(@"Hello Hello....performDragOperation");
return YES;
}
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender {
NSLog(@"Hello Hello....concludeDragOperation");
[[NSCursor arrowCursor] push];
[self setNeedsDisplay:YES];
}
- (BOOL) processNSDraggingInfo:(id <NSDraggingInfo>)sender {
NSLog(@"Hello Hello....processNSDraggingInfo");
return YES;
}