Jam*_*sev 11 storyboard xcode4.2
在我的Xcode 4.2故事板中,我有2个UIViewControllers,This one time和In band camp
This one time,我有一个UIButton"愚蠢的名字"In band camp,我有一个UILabel"标签"考虑到我们正在处理2个单独的类并且我们在Xcode 4.2中使用storyboards(通过segue设置视图之间的转换)如何将视图控制器This one time中的"愚蠢名称"传递给视图控制器中的标签In band camp?"

Lor*_*oog 19
在方法内部,检查segue的标识符是否与"AwesomeSegue"匹配 - 如果是,则使用destinationViewControllerObject
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"AwesomeSegue"]) {
InBandCampViewController *ibcVC = [segue destinationViewController];
ibcVC.yourData = self.someStuff;
}
}
Run Code Online (Sandbox Code Playgroud)| 归档时间: |
|
| 查看次数: |
5628 次 |
| 最近记录: |