iphone - Method is not calling from another class -


i have "class-a" contains method

-(void)methoda { //logic } 

i have "class-b" method

-(void)methodb { //logic } 

now trying call methoda class b

so

in class b

create object of "class-a"

classa *a;  @property(nonatomic,retain)classa *a;  @synthesize a;  -(void)methodb { [self.a methoda]; } 

but method not called. doing wrong or other approach doing ?

//in class //classa.h  @interface classa : nsobject   -(void)methoda; @end  //classa.m @implementation classa -(void)methoda {     //logic } @end   //in class b //classb.h  #import classa.h  @interface classb : nsobject  @property(nonatomic,retain)classa *a;  @end  //classb.m @implementation classb  @synthesize a;  -(void)methodb {     if(!self.a) self.a = [[classa alloc]init];     [self.a methoda];     //logic }  @end 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -