在 MZFormSheetController 中使用 didDismissCompletionHandler

using didDismissCompletionHandler in MZFormSheetController

我正在使用 MZFormSheetController to present modals in my app. There is a situation where I want to present a second sheet controller right after I dismiss the first one. In order to do that, there is a completion block,但我不知道如何实际使用它。

代码如下所示:

[self mz_presentFormSheetController:formSheet
                               animated:YES
                      completionHandler:^(MZFormSheetController *formSheetController) {
                          formSheetController.didDismissCompletionHandler;
                      }];

在那个完成处理程序中,我应该怎么做才能收到 sheet 解雇的通知,以便我可以调用第二个 sheet?

这实际上非常简单,但如果您没有在这种类型的环境中花费一些时间,则不是完全直观。

[self mz_presentFormSheetController:formSheet
                               animated:YES
                      completionHandler:^(MZFormSheetController *formSheetController) {
                          formSheetController.didDismissCompletionHandler = ^(UIViewController *presentedViewController){
                                  [self presentOtherController];
                          };
                      }];