(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"DetailPlacePage"]) {
NSIndexPath *indexPath = [self.Allplace indexPathForSelectedRow];
NomadPlaceDetailViewController *placedetailcontroller = segue.destinationViewController;
placedetailcontroller.myDictionary = [self.placeArray objectAtIndex:indexPath.row];
}
}
这是我用来为UIviewcontroller准备segue的代码。 无法看到下一个视图控制器,屏幕变为空白,只显示导航栏。
答案 0 :(得分:-1)
尝试投射NomadPlaceDetailViewController:
NomadPlaceDetailViewController *placedetailcontroller = (NomadPlaceDetailViewController *)segue.destinationViewController;