首页 > 解决方案 > -[ECSlidingViewController notifyWhenInteractionChangesUsingBlock:]:无法识别的选择器发送到实例

问题描述

我最近将 Xcode 更新到 11.3.1 版,之后我无法运行我的应用程序。我收到以下异常:

2020-02-11 16:13:04.767795-0600 UVM[5204:80616]-[ECSlidingViewController notifyWhenInteractionChangesUsingBlock:]:无法识别的选择器发送到实例 0x7f8258016c00

2020-02-11 16:13:04.785346-0600 UVM[5204:80616] *** 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[ECSlidingViewController notifyWhenInteractionChangesUsingBlock:]:无法识别的选择器发送到实例 0x7f8258016c00”

在我进行 Xcode 更新之前它工作正常。谁能帮我解决这个问题?

标签: unrecognized-selectorecslidingviewcontroller

解决方案


看起来以下方法已被弃用,它是在启动期间引发异常的方法。

  • (void)notifyWhenInteractionEndsUsingBlock:(void(^)(idcontext))handler { self.coordinatorInteractionEnded = handler; }

它在 ECSlidingViewController.m 中

如果我们注释掉该方法并添加以下方法,应用程序将再次正常工作:

  • (void)notifyWhenInteractionChangesUsingBlock:(nonnull void (^)(id _Nonnull))handler { self.coordinatorInteractionEnded = handler; }

推荐阅读