我在主视图控制器中有一个图像,我希望这个图像显示在新的视图控制器中......我知道如何在两个场景之间获取字符串值,但不知道故事板中的图像......请帮帮我.. .
Is it right way to pass UIImage to another controller...
if UIImage *img1=[UIImage imageNamed:@"1.jpg"]; and UIImageView is *newimgview for newViewController
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"imageview"])
{
newViewController *nvc=segue.destinationViewController;
nvc.newimgview.image=img1;
}
}