iphone - ApplicationWillEnterForeground's inconsistent behaviour -


I have the password authentication for my application My application window based MyApplicationAppDelegate , MainViewController , HelpViewController , SettingViewController and ErrorViewController : I have five approaches. In

When the application starts, I There are two buttons on the toolbar of the main view controller navigates to extend my help and direct directly related pages. Now, I wrote the following code MyApplicationAppDelegate :

  - (minus) applicationWillEnterForegroundUIApplication *) application {[self showMyView]; } - (void) showMyView {if {if (errorviewFlag) {if {ErrorPageViewController * bViewController = [[[ErrorPageViewController alloc] initWithNibName "ErrorPageViewController" bundle ([Global timeSet]!) ([Global show]!): [NSBundle mainBundle] ] Autoreshoe]; [Self set AERR: BVU controller]; Self.error = bViewController; // [add windowviewview: [error view]]; [[Self-Navigation Controller] Push ViewController: Animated BViewController: No]; UIBarButtonItem * _backButton = [[UIBarButtonItem alloc] initWithTitle "back" style: UIBarButtonItemStyleDone goal: zero action: zero]; [Self. Navigation controller set navigation bar: yes]; [Self. Navigation Controller Settlerbar: Yes]; [_backbutton release], _back button = zero; [Window-making and knowledgeable]; ErrorviewFlag = FALSE; [Global Setshow: TRUE]; }}}}   

Now, this method is called for all time except for the first time.

The problem works only in the desired way, that is, the error page shows, when I minimize the application from MainView, I do not show the error page at least if I reduce it from the help or setting, But why not have any navigation controls instead of the main page?

He was able to find the answer. I used it with the Nantrication CenterInternbackground I used it in all other views compared to MainView and in my didEnterBackground method I used [self.navigationController popViewControllerAnimated: NO] ;.

This is all other views when the application is minised, forced to come in MainView and resolve this problem

Comments