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. restorable

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 saved app state

also 1 hidden hack help:

- (void)applicationdidfinishlaunching:(nsnotification *)anotification {   [[nsuserdefaults standarduserdefaults] setobject:@no forkey:@"nsquitalwayskeepswindows"]; } 

Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -