Instance Property

needsPanelToBecomeKey

A Boolean value indicating whether the view needs its panel to become the key window before it can handle keyboard input and navigation.

Declaration

@property(readonly) BOOL needsPanelToBecomeKey;

Discussion

The default value of this property is NO. Subclasses can override this property and use their implementation to determine if the view requires its panel to become the key window so that it can handle keyboard input and navigation. Such a subclass should also override acceptsFirstResponder to return YES.

This property is also used in keyboard navigation. It determines if a mouse click should give focus to a view—that is, make it the first responder). Some views (for example, text fields) want to receive the keyboard focus when you click in them. Other views (for example, buttons) receive focus only when you tab to them. You wouldn't want focus to shift from a textfield that has editing in progress simply because you clicked on a check box.

See Also

Key-view Loop Management

canBecomeKeyView

A Boolean value indicating whether the view can become key view.

nextKeyView

The view object that follows the current view in the key view loop.

nextValidKeyView

The closest view object in the key view loop that follows the current view in the key view loop and accepts first responder status.

previousKeyView

The view object preceding the current view in the key view loop.

previousValidKeyView

The closest view object in the key view loop that precedes the current view and accepts first responder status.