NSEvent trackingArea 属性对mouseMoved事件无效

在mouseMoved事件里写theEvent.trackingArea运行时会崩

/* these messages are valid for enter and exit events */
@property (readonly) NSInteger trackingNumber;
@property (nullable, readonly) void userData NS_RETURNS_INNER_POINTER;
/
-trackingArea returns the NSTrackingArea that generated this event. It is possible for there to be no trackingArea associated with the event in some cases where the event corresponds to a trackingRect installed with -[NSView addTrackingRect:owner:userData:assumeInside:], in which case nil is returned. */
@property (nullable, readonly, strong) NSTrackingArea *trackingArea API_AVAILABLE(macos(10.5));

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 9,537评论 0 13
  • // //UIView.h //UIKit // //Copyright (c) 2005-2015 Apple ...
    李某lkb阅读 1,755评论 0 0
  • 英文文档,一开始我也是抗拒的,边翻译边看,也就花费了1个小时基本就阅读过了,我的英文基础其实很差。附上链接:链接:...
    lonecolonel阅读 10,036评论 3 1
  • 全力以赴就是拼尽全力,生活中不管做什么事情都应该如此。 从小家里穷,受到的教育少,除了正常的语文数学,所以在特长上...
    a智慧妈妈夏雨阅读 514评论 0 4
  • 虽然已经不早了,但是还是应该记录点什么。那些热切的想法一旦失去了温度,就再也没法形成真诚的文字了。 今天邀...
    青梅如小豆阅读 216评论 0 1