Attempt to present on which is already presenting /(null)

时间:2024-01-20 22:46:27

在给 tableViewCell 添加长按手势弹出一个 popViewController 的时候,遇到的这个变态问题;

Warning: Attempt to present <UINavigationController: 0x15f259c00>  on <RepoDetailViewController: 0x160271400> which is already presenting (null)

我的solution :

不使用手势去运行此方法。换用了button的addTarget.反正不能再用长按手势了!

[self presentViewController:vc animated:YES complished:nil];