macOS-label,NSImageView添加点击事件
1.在Xcode里面添加两个控件,NSTextFiled,NSImageView,然后连线到ViewController.h中,随便命名控件,m_labelBaiDu,m_imageView2.在ViewController.m中代码如下- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSClickGestureReco