疯狂的 MAPKit bug 'NSInvalidArgumentException',原因:'*** -[UISwipeGestureRecognizer removeFromSuperview]:无法识别的选择器发送到实例

发布于 2024-08-10 20:54:31 字数 351 浏览 1 评论 0原文

好吧,我已经埋在 MAPKit 里有一段时间了。我从 SQLite 数据库中删除了引脚。距离位置有效,注释有效,看起来很棒。甚至我的活动指示器也能工作。然后就在我交接项目之前,我会滑动、打手势,你将其命名为我可爱的地图,效果很好,然后轰隆隆!哎呀!

由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“*** -[UISwipeGestureRecognizer removeFromSuperview]:无法识别的选择器发送到实例 0x143cb0”

我正在通过代码创建此内容,没有 IB。谷歌结果为零。任何解决这个问题的建议都值得赞赏!出于某种原因,我的地图视图在 SwipeGesture 上出现异常?嗯?

Ok, i have been buried in MAPKit for quite a while. I have dropping pins from a SQLite DB. Distance locations working, annotations working, looks great. Even my activity indicator works. Then right before I hand off the project, I'm swiping, gesturing, you name it to my cute map, works great, then BOOM! yipes!

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UISwipeGestureRecognizer removeFromSuperview]: unrecognized selector sent to instance 0x143cb0'

I'm creating this by code, no IB. Google turned up ZERO. Any tips on tackling this one appreciated! For some reason my mapView freaks out on a SwipeGesture? huh?

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

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

发布评论

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

评论(1

初懵 2024-08-17 20:54:31

这种类型的异常,特别是当它们起源神秘并且涉及您无法识别的对象时,通常是由于内存管理错误造成的——过度释放对象、保留指向对象的指针而不保留它们等等。我会尝试使用 NSZombieEnabled 运行以查看是否可以发现错误的根源。 (总的来说,它是一个可供您使用的好工具。) NSZombieEnabled 的一个不错的介绍是:

http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/

Exceptions of this type, particularly when they are mysterious in origin and involve objects you don't recognize, are usually due to memory management bugs -- overreleasing objects, keeping around pointers to objects w/o retaining them, etc. I'd try running with NSZombieEnabled to see if you can spot the source of the bug. (It is in general a good tool to have at your disposal.) A decent intro to NSZombieEnabled is:

http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/

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