我想向 ViewController 添加四个不同的图片。我可以添加一张图片。当我尝试在不同的 Imageview 中添加另一张图片时,两个 imageviews 上都会出现相同的图片。谁能告诉我如何添加独特的图片。
- (void)imagePickerControllerUIImagePickerController *)picker didFinishPickingMediaWithInfoNSDictionary *)info {
if(choosePhoto1){
NSLog(@"buttonclicked:button1");
theimageView1.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
[picker dismissModalViewControllerAnimated:YES];
}
else if(choosePhoto2) {
NSLog(@"buttonclicked:button2");
theimageView2.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
[picker dismissModalViewControllerAnimated:YES];
}
}
谢谢。