0

使用 Segue 将数据(字符串)从子视图控制器传递到父 VC。有人可以建议我最快和最简单的方法(在故事板中),

4

2 回答 2

0

试试这个博客,它解释了你需要知道的每一件事:)

http://www.appcoda.com/storyboards-ios-tutorial-pass-data-between-view-controller-with-segue/

UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
ActionsViewController *vc =[storybord instantiateViewControllerWithIdentifier:@"-----"];
vc.Title =[namesarray objectAtIndex:indexPath.row];//where Title variable at next view class
[self.navigationController pushViewController:vc animated:YES];
于 2012-12-11T21:25:03.260 回答
0

您需要 prepareForSegue:sender: 在可以访问destinationViewController.

于 2012-12-11T21:38:39.193 回答