https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate_Protocol/#//apple_ref/occ/intfm/NSWindowDelegate/windowDidBecomeMain:
NSWindowDelegate
Inherits From
Conforms To
Not Applicable
Import Statement
OBJECTIVE-C
Availability
Available in OS X v10.6 and later
The NSWindowDelegate
protocol defines the methods that a delegate of NSWindow
should implement. All methods in this protocol are optional.
By implementing these methods, the delegate may respond to window resizing, moving, exposing, minimizing, and a number of other window events.
-
- windowDidResignKey:
[[NSNotificationCenter defaultCenter] addObserver:
selector
name:NSWindowDidResignKeyNotification
object:;
-
-
Tells the delegate that the window has become main.
Declaration
SWIFT
optional func windowDidBecomeMain(_
notification
: NSNotification)OBJECTIVE-C
- (void)windowDidBecomeMain:(NSNotification *)
notification
Parameters
notification
A notification named
NSWindowDidBecomeMainNotification
.Discussion
You can retrieve the window object in question by sending
object
tonotification
.Availability
Available in OS X v10.0 and later.
Available as part of an informal protocol prior to OS X v10.6.
See Also
-
Tells the delegate that the window has resigned main window status.
Declaration
SWIFT
optional func windowDidResignMain(_
notification
: NSNotification)OBJECTIVE-C
- (void)windowDidResignMain:(NSNotification *)
notification
Parameters
notification
A notification named
NSWindowDidResignMainNotification
.Discussion
You can retrieve the window object in question by sending
object
tonotification
.Availability
Available in OS X v10.0 and later.
Available as part of an informal protocol prior to OS X v10.6.
See Also
-