我从 BaseViewController 继承了我的 ViewController,并且我已经使用情节提要 ID 推送了我的 SecondViewController。但是,当我试图从第二个视图弹出视图到视图控制器时,它不起作用。这是我的代码:
dispatch_async(dispatch_get_main_queue(), ^{
[self showMesssgeonAlert:@"Success"];
[self hideProgress];
[self.navigationController popViewControllerAnimated:TRUE];
});
即使我尝试过:
NSArray *controllerArray = self.navigationController.viewControllers;
for (id controller in controllerArray)
{
if ([controller isKindOfClass:[ViewController class]])
{
[self.navigationController popViewControllerAnimated:TRUE];
}
}
但是,它在这两种情况下都不起作用。我该怎么办?请帮帮我。