Segue is blank (black) , can't view the data

99封情书 提交于 2019-12-13 05:34:06

问题


(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];
  }
}

This is the code I use to prepare segue for UIviewcontroller. Can't see the next view controller , screen gets blank and just navigation bar is shown .


回答1:


Try casting your NomadPlaceDetailViewController:

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


来源:https://stackoverflow.com/questions/19789023/segue-is-blank-black-cant-view-the-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!