osx - Setting initial position of NSWindow only works the first time -
i'm trying set nswindow in center of screen, i'm noticing when quit , reopen app, takes position window in when app closed. expected behavior?
if selected "restorable" window behaviour it's correct behaviour.
you can disable behaviour unchecking restorable , leave autosave name empty.
your application saves state "~/library/saved application state/com.identifier.appname.savedstate" folder , loads on launch
also 1 hidden hack help:
- (void)applicationdidfinishlaunching:(nsnotification *)anotification { [[nsuserdefaults standarduserdefaults] setobject:@no forkey:@"nsquitalwayskeepswindows"]; }
Comments
Post a Comment