I'm trying to get a simple NSLog
message if the destinationviewcontroller
isKindOfClass
like this:
FirstViewController.m
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.destinationViewController isKindOfClass:[SecondViewController class]]) {
NSLog(@"The destinationViewController isKindOfClass SecondViewController");
}
Within the storyboard i have ctrl+dragged from a bar button item in the FirstViewController
to the SecondViewController
and chosen modal segue.
I've also made sure to #import
the SecondViewController.h
in FirstViewContrller.m
and i have given the SecondViewController
the "custom class" of SecondViewController
in the identity inspector.
Do i need to add/do something else, because I'm not getting the NSLog
message at this point.
Edit: I forgot to inform that i did in fact embed the secondViewController in a navigationViewController.