Weird error message in Xcode 4.3 with LLDB

↘锁芯ラ 提交于 2019-11-27 15:17:11

The cause of this error are incorrect build settings, as indicated by the discussion in the question post comments. This can be fixed by setting "Deployment Postprocessing" back to NO for Debug-Mode (the default value).

Make sure MyFancyClass.m is added to your Target

Your selector that the nsnotification is being sent to needs to have one (and only one) argument, which is an NSNotification. So when you do this:

[notificationCenter addObserver:self selector:@selector(foo) name:bar object:objA];

-(void)foo
{

}

...you need to be doing this: [notificationCenter addObserver:self selector:@selector(foo:) name:bar object:objA];

-(void)foo:(NSNotification *)notification
{

}

Notice the colon in the selector for the notificationCenter, and the argument for foo.

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