Pergunta

I am an elementary school teacher currently working with a developer through Elance on a reading log app for iPhone/iPod/iPad. The app allows for multiple users to create individual profiles/reading logs. Users will then access their logs via a 'Students' page (which lists all users) and then by entering a password. To avoid the need for each student to log out after each logging session (some elementary students might forget to log out and then another student could unintentionally record her reading activity on the previous user's log.) we have it coded so that the app closes when the home button is pressed. However, this set-up is not ideal, and gets a little frustrating when multitasking. One solution, after closing the app with the home button, would be to have it reopen displaying the 'Students' page. I have 2 questions:

  1. Is possible to close an app from one page and have it reopen on a different page within the app?

  2. Are there any other solutions to this problem?

Foi útil?

Solução

In the UIAppDelegate class use applicationWillTerminate: to store a persistent value (for example in NSUserDefaults). The next time the app starts this value can be checked and appropriate action taken.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top