I have a ViewControllerA and a ViewControllerB. I want calling a method of ViewControllerA from ViewControllerB.
In ViewControllerA is present a method:
-(NSMutableArray*) loadData;
In ViewControllerB.h:
#import "ViewControllerA.h"
.......
@property (nonatomic, strong) ViewControllerA * viewControllerA;
@property (nonatomic, strong) NSMutableArray * mutableArray;
In ViewControllerB.m:
self.mutableArray =[viewControllerA loadData];
but the method is not calling. Why? Thanks in advance
You are missing
As long as somewhere in viewControllerB:
then:
will work.