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

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -