iOS 返回事件 《方便记忆》
2020-04-11 本文已影响0人
奔跑吧小蚂蚁
if (self.navigationController) {
if (self.navigationController.viewControllers.count > 1) {
[self.navigationController popViewControllerAnimated:YES];
}else{
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
}
}else{
[self dismissViewControllerAnimated:YES completion:nil];
}