سؤال

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?

هل كانت مفيدة؟

المحلول

In plist file add one more field

Application does not run in background : make it true

enter image description here

نصائح أخرى

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];
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top