unrecognized-selector - -[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 更新之前它工作正常。谁能帮我解决这个问题?
解决方案
看起来以下方法已被弃用,它是在启动期间引发异常的方法。
- (void)notifyWhenInteractionEndsUsingBlock:(void(^)(idcontext))handler { self.coordinatorInteractionEnded = handler; }
它在 ECSlidingViewController.m 中
如果我们注释掉该方法并添加以下方法,应用程序将再次正常工作:
- (void)notifyWhenInteractionChangesUsingBlock:(nonnull void (^)(id _Nonnull))handler { self.coordinatorInteractionEnded = handler; }
推荐阅读
- php - 未找到 laravel 模型中的搜索问题
- node.js - 无法从 http.js 文件配置 bodyParser 限制,因此得到 413 http 错误
- java - Java XML DOM:为什么 Java XML Attr.isId() 在应该返回 true 时返回 false
- gem5 - 如何在 gem 5 中运行我自己的程序?假设我想对 1 千个数字进行排序,因为我想制作程序然后想运行?
- javascript - JavaScript/jQuery 2 下拉菜单在页面加载时具有相同的选择选项
- java - 在格式化代码时保持语句彼此相邻
- python - 每次我获取 Facebook Python3 的源代码时,我是如何得到这个解码错误的
- spring - 使 application.properties 保持最新
- python - Python:全局影响字典而不是单个类字典
- laravel - 在 Laravel 中添加自定义验证时,类 Closure 的对象无法转换为字符串