我用NSNotificationCenter:NSNotification - 观察者不匹配
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playNow:) name:@"PlayNow" object:nil];
和邮政业:
[[NSNotificationCenter defaultCenter] postNotificationName:@"PlayNow" object:nil userInfo:noteInfoDictionary];
其中自是@interface MyPlayer : NSObject
例如当我把它与大多数情况下的伟大工程,但是当我dealloc和拨回MyPlayer实例我得到这个错误:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView playNow:]: unrecognized selector sent to instance 0x8929150'
如何从UIView中获取错误?
您是否在删除dealloc中的观察者?如果没有,你应该。 – rdelmar
是的,这是问题所在。 – Kuba