1

我有一个小问题。当我单击后退按钮时,它会转到上一页。

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

它工作正常。当我单击同一页面视图中的刷新按钮时,加载。之后,当我单击后退按钮时,它会转到上一页之前。但在这里我想要上一页而不是上一页之前。

- (IBAction)refreshButton:(id)sender {

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

}

这就是我在刷新按钮中所做的。它将在模拟器 iOS 7 和 8 中完美运行。当我在设备中运行时,它会显示此错误。提前致谢。

4

1 回答 1

0

我得到了答案。简单设置用户交互

- (IBAction)backToHome:(id)sender {
   _homeButton.userInteractionEnabled = NO;
   testingViewClicked = @"NO";
   [self.navigationController popViewControllerAnimated:YES];
}
于 2015-02-03T07:07:12.883 回答