`unrecognized selector sent to instance <OBJ_ADR>`after sending `dismissViewControllerAnimated:completion` to a UIViewController

空扰寡人 提交于 2019-11-29 16:51:13

I got the solution myself!

Knowing it the error message makes sense:
The answer lies in the used XIB-file(s).

Rule of thumb:
Check your GUI-Elements in InterfaceBuilder by right-cklicking or "ctrl"+clicking that all their sent events are connected to existing methods!

If that is not the case the
instance means the GUI element get sent a
unrecognized selector means a non existing method connected to it in InterfaceBuilder. ;-)

Be aware that one event can be connected to several methods. If even one of them is not defined (any longer) you will get that error. Keep this in mind if you delete, rename or change signatures of methods manually. The formerly made connection may still exist.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!