Pregunta

I have four UIViewController for displays different purpose. If i launch the app it displays Delegate function. If i go to second or third viewcontroller then close the app. Again open the app, it displays third or second viewcontroller. I need to start app from delegate. How to do?

¿Fue útil?

Solución

In plist file add one more field

Application does not run in background : make it true

enter image description here

Otros consejos

Just pop your navigationcontroller to root view in your applicationDidBecomeActive method.

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    [navigationCtrl popToRootViewControllerAnimated:NO];
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top