Notification when display resolution changes?
Notification when display resolution changes?
- Subject: Notification when display resolution changes?
- From: Gabriel Zachmann <email@hidden>
- Date: Mon, 31 Aug 2009 01:45:57 +0200
Is there a way to have my Cocoa app get notified when the display
resolution changes? (while my app is running)
The reason is that I am trying to make the window of my app always as
large as the screen.
Currently I do that in the init method of my window with
NSRect visibleFrame = [[self screen] visibleFrame];
[self setFrame: visibleFrame display: YES];
However, when the screen resolution changes (for instance, because
I've plugged in a projector), then the window is too big.
I guess I could do setFrame: every time in the draw: method of my view
-- but would that be the proper way to do it?
I tried to find an answer to this question in the documentation, but
failed.
Any pointers will be highly appreciated.
Best regards,
Gabriel.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden