我有两个跟踪区域:
NSTrackingArea * area1 = [[NSTrackingArea alloc] initWithRect:NSMakeRect(0,0,200,200) options:NSTrackingMouseEnteredAndExited|NSTrackingActiveAlways owner:self userInfo:nil];
NSTrackingArea * area2 = [[NSTrackingArea alloc] initWithRect:NSMakeRect(0,200,200,200) options:NSTrackingMouseEnteredAndExited|NSTrackingActiveAlways owner:self userInfo:nil];
我的问题是当我直接从area1到area2时,不会调用area2的“mouseEntered”方法,因为检测到的事件是来自area1的“mouseExited”。离开area1并进入area2时,我该怎么做才能检测到事件?