First responder on mouse down behavior NSControl and NSView
问题 I have a custom control. If it inherits from NSView , it automatically becomes the first responder when I click on it. If it inherits from NSControl , it does not. This difference in behavior persists, even if I override mouseDown(with:) and don't call super. Code: class MyControl: NSView { override var canBecomeKeyView: Bool { return true } override var acceptsFirstResponder: Bool { return true } override func drawFocusRingMask() { bounds.fill() } override var focusRingMaskBounds: NSRect {