I've got two views, view1 calls : [self.view addSubview:view2.view];
then views2 calls: [self.view removeFromSuperview];
and I want to reload data in view1 when view1 reappear but I can't call a method or update a property of view1 because I can't make an#import "view1.h"
in view2 (I've made an #import "view2.h"
in view1).
This is my code :
View1.h :
-(void)reloadData;
View1.m :
#import « View2.h » ;
View2 *view2 = [[View2 alloc]init];
[self.view addSubview:view2.view];
View2.h :
#import « View1.h »
View2.m :
// I want to call reloadData to reload Data of view1 before removing view2
[self.view removeFromSuperview];