We have 2 files 'MainViewController' and 'View01'
The first file addSubView the second one.
In the first file we have a function named displayView.
I want to be able to call this function from the View01 file is the following code correct
part of View01 file
#import "MainViewController.h"
- (IBAction) changeView:id(sender){
MainViewControlle *appDelegate = [[UIApplication sharedApplication] delegate];
[appDelegate displayView:2];
}
is this the correct way to do it?
at the moment I use the NSNotificationCenter to send activate the functions :)