Mandeep
Mandeep

Reputation: 3

NSTextField is not working over Full Screen

NSTextfield is not working when I make a full screen app. I have also made first responder of textfield. How can I make it enable and working?

Upvotes: 0

Views: 219

Answers (1)

Deepika
Deepika

Reputation: 3562

Full Screen window won't get any keyboard events the way it is, due to the fact that it was created with with the NSBorderlessWindowMask style mask. Apparently windows of this type can't become "key windows". However, you can fix this problem by subclassing NSWindow and overriding the canBecomeKeyWindow method.

- (BOOL)canBecomeKeyWindow
{
    return YES;
}

Upvotes: 1

Related Questions