1

我有NSOpenGLView

。H

#import <Cocoa/Cocoa.h>

@interface MainOpenGLView : NSOpenGLView <NSWindowDelegate, NSSharingServiceDelegate, NSSharingServicePickerDelegate> 
@end

.m

#import "MainOpenGLView.h"
@implementation MainOpenGLView

- (id)initWithCoder:(NSCoder *)coder {
    self = [super initWithCoder: coder];
    return self;
}

- (void)mouseDown:(NSEvent *)theEvent {

    NSLog(@"mouse down");

}
@end

而且 mouseDown 方法不起作用。所有其他鼠标事件也是如此。我究竟做错了什么?

4

0 回答 0