首页 > 代码库 > Attempt to present <vc> on <vc> which is already presenting <vc>/(null)

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

在给 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];

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