Segue是空白的(黑色),无法查看数据

时间:2013-11-05 12:28:14

标签: ios uiviewcontroller segue

(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的代码。 无法看到下一个视图控制器,屏幕变为空白,只显示导航栏。

1 个答案:

答案 0 :(得分:-1)

尝试投射NomadPlaceDetailViewController:

NomadPlaceDetailViewController *placedetailcontroller = (NomadPlaceDetailViewController *)segue.destinationViewController;