开发者

Selector error when trying to initialize

开发者 https://www.devze.com 2023-01-11 07:44 出处:网络
m_NetworkController is my network class and SelDataRecivedError is member of type SEL now if i am trying to initialize this selector member from other class like this:

m_NetworkController is my network class and SelDataRecivedError is member of type SEL now if i am trying to initialize this selector member from other class like this:

m_NetworkController.SelDataRecivedError = NSSelec开发者_Python百科torFromString(@"DataRecivedErrorFromServer"); 

i am getting the error -[NCcontroller setSelDataRecivedError:]: unrecognized selector sent to instance 0x3e010c0

what i am missing here? i have property and @synthesize for the SelDataRecivedError


Don't you try to retain selector?

property should look like this:

@property (assign) SEL SelDataRecivedError;


got it. sorry the problem was with @synthesize

0

精彩评论

暂无评论...
验证码 换一张
取 消