How to start app in the same position I left it last time?
Hi everyone.
I noticed that some mac applications start in the position where they were last time I used them. So, for example, if I put that application on the bottom left side of the screen and then I close that app, next time I open it I will find it there again.
How do they do that?
Anyone could give me any hint about how to do that or maybe where I can find more info about this?
I tryed looking for it in Google but had no luck.
Thanks for your help
Massy
Last edited by bluebeardit; 01-25-2012 at 03:14 PM.
You should get current position of your application form and write it in a file , when your program starts read the values that store in the file and set the position of your application form using them , when your application goes to close save the current position in file again ...
if you don,t know about how to get the current position of you application form or how to write/read data to file , search it ...
You should get current position of your application form and write it in a file , when your program starts read the values that store in the file and set the position of your application form using them , when your application goes to close save the current position in file again ...
if you don,t know about how to get the current position of you application form or how to write/read data to file , search it ...
Regards , Mojtaba .
Hey! Thanks for your answer... I was hoping there was an easier way... but it's ok... I will do something like that....
Peace
Massy
You should get current position of your application form and write it in a file , when your program starts read the values that store in the file and set the position of your application form using them , when your application goes to close save the current position in file again ...
if you don,t know about how to get the current position of you application form or how to write/read data to file , search it ...
Regards , Mojtaba .
As a matter of fact there is an easier way.... you just have to write the name of the form in the Autosave field under Attributes in Interface Builder... and that's all!
Peace
Massy
Thanks , i'm new to X-Code and don,t know any thing about Autosave field , in other languages & OS Should to do it like my answer , here it,s very easy ...