我在主視圖控制器中有一個圖像,我希望在新視圖控制器中顯示此圖像...我知道如何獲取兩個場景之間的字符串值,但不知道故事板中的圖像....請幫我...在故事板中的兩個場景之間傳輸圖像
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;
}
}
你得到它的工作? – satheeshwaran