Are there any Monotouch multitasking sample I can download?
I’m having problems in finding out best practice using multitasking with Monotouch. How I should handle when user presses home button, my application goes to the background, reopens my program and I must show where he left off (how to show the correct form/view) … a sample of that would I love to see.
Thanks!
Morten
You will have to override the methods DidEnterBackground and WillEnterForeground in the AppDelegate class. Inside these methods, you will have to save the current state of the app on your own (eg. which controller was active, what data was displayed etc).
The implementation of DidEnterBackground should be lightweight. In case you need more time for your app before it gets suspended, check how you could do it in this blog post.