Reputation: 1183
Is it possible to get notification when application entered fullscreen mode? Because I have to redraw images when app enters full screen, and now I can't do it because I don't know when app enters fullscreen.
I found method:
- (void)windowDidEnterFullScreen:(NSNotification *)notification
but where I have to use it? Because in NSWindow
class it is not working.
Upvotes: 0
Views: 1800
Reputation: 5230
You can also use this function
- (void)windowDidResize:(NSNotification *)notification{
}
This function get called whenever the size of the window changes.
Upvotes: 1
Reputation: 7850
Full-Screen API in NSWindowDelegate Protocol:
The following notifications are sent before and after the window enters and exits full-screen mode:
NSWindowWillEnterFullScreenNotification
NSWindowDidEnterFullScreenNotification
NSWindowWillExitFullScreenNotification
NSWindowDidExitFullScreenNotification
Upvotes: 5