i'm trying to pass data to a viewcontroller when the back button is pressed for that i'm using the viewDidDisappear method, which works fine. The problem is that even though i've created the object in the targeted viewController it cant find it?
property 'rentTimeArray' not found on object of type ViewControllerA
i'm trying to send a nsarray from viewcontrollerB to viewcontrollerA
viewcontrollerB.m
first i import the targeted header file
import "ViewControllerA.h"
viewDidDissapear method:
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (self.isMovingFromParentViewController) {
NSArray * values = [pickedArray allValues];
ViewControllerA *newHome = [[ViewControllerA alloc] init];
newHome.rentTimeArray = newHome;
}
ViewControllerA.m
@property (nonatomic, weak) NSArray *rentTimeArray;
ViewControllerA.h
@Synthenize rentTimeArray,