1

I have a small issue. When i click on back button it goes to previous page.

- (IBAction)backToHome:(id)sender {
    testingViewClicked = @"NO";
    [self.navigationController popViewControllerAnimated:YES];
}

It works fine. When i click on refresh button in the same page view is loaded. After that when i click on back button it goes to before previous page. But here i want previous page not before previous page.

- (IBAction)refreshButton:(id)sender {

   [defaults removeObjectForKey:@"orderViewController"];
   [self viewDidLoad];
   fDate = [NSString stringWithFormat:@"%@", [defaults objectForKey:@"fromDateOrderView"]];
   NSLog(@"from date here %@", fDate);
   [self orderFuntionCalling];

}

This is what i am done in refresh button. It will works perfect in simulator iOS 7 & 8. When i run in a device it shows this bug. Thanks in advance.

vishnu
  • 705
  • 9
  • 20

1 Answers1

0

I got the answer. Simply setting user interaction

- (IBAction)backToHome:(id)sender {
   _homeButton.userInteractionEnabled = NO;
   testingViewClicked = @"NO";
   [self.navigationController popViewControllerAnimated:YES];
}
vishnu
  • 705
  • 9
  • 20