How to save a window's position and size
How to save a window's position and size
- Subject: How to save a window's position and size
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Fri, 22 May 2020 23:22:51 +0200
I am trying to follow these instructions:
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/WinPanel/Tasks/SavingWindowPosition.html
However, my app doesn't have a NSWindowController.
It just has a NSViewController and an AppDelegate.
So i thought I could stick the two lines of code mentioned in the doc in one of
the app delegate's methods.
I tried to put them in applicationDidFinishLaunching, but they don't have an
effect.
I tried to define -awakeFromNib in the app delegate and put them there,
but awakeFromNib never gets called.
I defined -windowDidLoad in the app delegate, but that, too, never gets called.
(However, other methods like windowWillClose or windowDidEndLiveResize do get
called.)
Any hints how to achieve the goal will be 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