根据您的个性需求进行定制 先人一步 抢占小程序红利时代
iOS 判断是push还是present下面这种方法判断成功了
if (self.presentingViewController)
{
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}
else {
[weakSelf.navigationController popViewControllerAnimated:YES]; }



