objective c - Calling Function from RootViewController -


how call rootviewcontroller function firstviewcontroller? i'm using xcode 4.6 storyboard.


rootviewcontroller.m:

-(void)openmenu {     ... } 

firstviewcontroller:

- (ibaction)btnmenu:(id)sender {     rootviewcontroller *root = [[rootviewcontroller alloc] init];     [root openmenu]; // no visible @interface 'rootviewcontroller' declares selector 'openmenu' } 

you have declare method in header rootviewcontroller.h. example

- (void)openmenu; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -