ios - How can I use NSNotificationCenter to call a method in a second class? -
i'm trying use nsnotificationcenter
call method in second class i'm getting error:
second class method(request.m) :
-(void)gettherequest:(nsstring *)wheretocall;
and i'm trying call nsnotificationcenter
this:
request *newrequest=[[request alloc]init]; [self performselector:@selector(newrequest.gettherequest:) withobject:@"mysite"];
but i'm getting error in part "newrequest.gettherequest" says "expected expression". of know how can fix or how can use nsnotificationcenter
call methods in different classes?
try this:
[newrequest performselector:@selector(gettherequest:) withobject:@"mysite"];
please note class names should start capital letter , getters should not use prefix apple's coding standards introduction coding guidelines cocoa
Comments
Post a Comment