一次触摸两个 uitextview 时崩溃

发布于 2025-01-02 07:31:35 字数 385 浏览 1 评论 0原文

我的应用程序中有两个 uitextview。这两个对象都属于同一类 uitextview。我从 Touchs begin 方法传递对象 self 的通知,并从 uitextview 类传递结束触摸,以便将 uitextview 进一步处理到另一个类。现在,当我同时触摸这两个文本视图时,我的应用程序崩溃并出现以下错误。

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

I have two uitextviews in my application. Both objects are of same class of uitextview.I am passing notification with object self from touches begin method and touches ended from uitextview class for further processing of uitextview to another class. Now when i touch these two textviews simultaneously my app crashes with following error.

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千仐 2025-01-09 07:31:35

这意味着您向字典中插入了一个 nil 对象。
也许是对象[0]。

it's means you insert a nil object to dictionary.
maybe objects[0].

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文