【发布时间】:2015-03-06 11:15:53
【问题描述】:
我正在使用运行良好的 presentViewController,见下文:
当 presentViewController 完全关闭或按下完成/返回按钮时,我需要运行一个代码(让我们说一个警报“我已关闭”)。
我不想使用完成块,因为它会在 presentViewController 打开后立即触发。在 presentViewController 关闭或关闭后,我基本上需要能够运行一些代码。
代码:
QLPreviewController* myPopup = [[QLPreviewController alloc] init];
myPopup.delegate = weakSelf;
myPopup.dataSource = weakSelf;
UIViewController* root = [[[UIApplication sharedApplication] keyWindow] rootViewController];
[root myPopup animated:YES completion:nil ];
//here put alert when it's closed or dismissed
有人可以帮忙吗?
【问题讨论】:
标签: ios qlpreviewcontroller presentviewcontroller