I have a storyboard and using segues to navigate between views
I am using the following code
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"thestring"]) {
[[segue destinationViewController] function1:argument1:argument2];
[[segue destinationViewController] function2:argument1:argument2];
}
}
for some reason it is recognizing function1 as a member of the destination view controller but not function 2 , it displays me the current error:
no known instance method for selector 'function2'
function2 is assigned as a public function of the destination view controller (with a “-” before it) and it is also used inside the code of the destination view controller.
any reason why it does not detect it ?
Thanks
EDITED
the header declaration is as follows
-(void)function2:(NSString*)argument1:(NSString*)argument2;
Use a cast to tell the compiler what class
destinationControlleris actually an instance of.