Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-25-2012, 02:23 PM   #1 (permalink)
Registered Member
 
bluebeardit's Avatar
 
Join Date: May 2011
Posts: 108
bluebeardit is on a distinguished road
Default 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.
bluebeardit is offline   Reply With Quote
Old 02-04-2012, 04:07 AM   #2 (permalink)
Geek Programmer
 
Join Date: Feb 2012
Location: Sky
Posts: 4
Silver boy is on a distinguished road
Default

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 .
Silver boy is offline   Reply With Quote
Old 02-04-2012, 06:32 PM   #3 (permalink)
Registered Member
 
bluebeardit's Avatar
 
Join Date: May 2011
Posts: 108
bluebeardit is on a distinguished road
Default

Quote:
Originally Posted by Silver boy View Post
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
bluebeardit is offline   Reply With Quote
Old 02-04-2012, 06:55 PM   #4 (permalink)
Registered Member
 
bluebeardit's Avatar
 
Join Date: May 2011
Posts: 108
bluebeardit is on a distinguished road
Default

Quote:
Originally Posted by Silver boy View Post
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
bluebeardit is offline   Reply With Quote
Old 02-05-2012, 01:08 PM   #5 (permalink)
Geek Programmer
 
Join Date: Feb 2012
Location: Sky
Posts: 4
Silver boy is on a distinguished road
Default

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 ...
Silver boy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 375
10 members and 365 guests
Creativ, Emy, eski, husthlj, illogical, LegionMD, LunarMoon, padsoftware, stanny, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0