In CalViewController class I have showCal method
-(IBAction) showCal{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
if ([viewMainView superview]) {
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
[viewMainView removeFromSuperview];
[self.view addSubview:viewCalView];
}
}
I want to call it from CustomCell class, which is a separate class with xib for custom cell.
I tried like this, (buttonPressed method associate with a button in the custom cell).
-(IBAction) buttonPressed{
CalViewController *objCalViewController=[[calViewController alloc] init];
[objCalViewController showCal];
}
But it doesn’t work.
[objCalViewController showCal]; put a break point before it and change the function to -(void)showCal and don’t forget to put the -(void)showCal in .h file of CalViewController class hope it will works for you 🙂