Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So, I never did get this to work. I observe this behavior on the device only every time I call popViewController programatically instead of allowing the default back button on the navigation controller to do the popping.</p> <p>My workaround was to build a custom loading view, and flip the screen to that view every time there would be a delay due to accessing the internet. My method takes a boolean variable of yes or no - yes switches to the loading screen and no switches back to the normal view. Here's the code:</p> <pre><code>- (void)switchViewsToLoading:(BOOL)loading { // Start the Animation Block CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.tableView cache:YES]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:.75]; // Animations if(loading) { if (lv == nil) { lv = [[LoadingViewController alloc] initWithNibName:@"Loading" bundle:nil]; } [self.view addSubview:lv.view]; [self.view sendSubviewToBack:self.tableView]; self.title = @"TrailBehind"; } else { [lv.view removeFromSuperview]; } // Commit Animation Block [UIView commitAnimations]; //It looks kind of dumb to animate the nav bar buttons, so set those here if(loading) { self.navigationItem.rightBarButtonItem = nil; self.navigationItem.leftBarButtonItem = nil; self.title = @"TrailBehind"; } else { UIBarButtonItem *feedback = [[UIBarButtonItem alloc] initWithTitle:@"Feedback" style:UIBarButtonItemStylePlain target:self action:@selector(feedbackClicked)]; self.navigationItem.rightBarButtonItem = feedback; UIBarButtonItem *update = [[UIBarButtonItem alloc] initWithTitle:@"Move Me" style:UIBarButtonItemStylePlain target:self action:@selector(updateClicked)]; self.navigationItem.leftBarButtonItem = update; [feedback release]; [update release]; } </code></pre> <p>}</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload