method 1. typecast
APPDetailViewController myController = (APPDetailViewController)segue.destinationViewController;
myController.myString = string;
method 2. selector
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.destinationViewController respondsToSelector:@selector(setMyData:)]) {
[segue.destinationViewController performSelector:@selector(setMyData:)
withObject:myData];
}
}
in destination View Controller
@property (nonatomic, strong) MyData *myData;