【发布时间】:2012-01-21 03:18:17
【问题描述】:
我想将加载了图像的 UIImageView 从单击按钮传递到不同 ViewController 中的不同 UIImageView。
这是我的代码
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Make sure your segue name in storyboard is the same as this line
if ([[segue identifier] isEqualToString:@"MY_SEGUE"])
{
// Get reference to the destination view controller
ViewControllerName *vc = [segue destinationViewController];
// Pass the current UIImageView to a different UIImageView in a different view controller
[vc setUIImageView:UIImageView2];
}
}
到目前为止,当我运行它时,当我加载下一个视图时没有任何反应。我没有错误。我需要在 - (void)viewDidLoad 中说些什么才能使它起作用吗?
任何提示或建议???
谢谢
【问题讨论】:
标签: ios xcode uiviewcontroller uiimageview segue