简体   繁体   中英

Call from within a app and retain the app state

In my application, I have a requirement of displaying some information on a page including the phone number. I need to allow user to make phone call from this page and also want to retain the state of the application once call is over ie once user is done with the call, he should land back to the original page where he left. How to achieve this?

iOS4 features multitasking.

You don't need to do anything. User taps somwhere, makes a call, ends it and applicationDidBecomeActive: in your AppDelegate is called. And your app returns exactly to the place where user left it.

From UIApplicationDelegate's Protocol Reference :

This method is called to let your application know that it moved from the inactive to active state. This can occur because your application was launched by the user or the system. Applications can also return to the active state if the user chooses to ignore an interruption (such as an incoming phone call or SMS message) that sent the application temporarily to the inactive state .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM