I had a view controller which is initialised in appdelegate.I was added that viewcontroller to the navigation controller with addsubview methode,inorder to show it above the navigation bar.Now i am adding another viewcontrollers view as the subview of this view.Now when i am pressing a button on the subview i need to perform some methodes in the superview.I tried this way`
appdelegate.viewcontroller =(ViewController*)self.view.superview;
}
if(appdelegate.viewcontroller==nil)
{
NSLog(@"appdelegate viewcontroller nil");
}
else
{
[appdelegate.viewcontroller setmessage:@""];
}
`But it is giving me error like
[UIView setmessage:]: unrecognized selector sent to instance.Can anybody point me in where i am going wrong?