1
"FirstView"및 "SecondView"라는 2 개의 뷰를 만들었습니다 .SecondView의 nib 파일에는 UIImage 뷰 객체가 IBOtlet.Now로되어 있습니다. 일부 FirstViewController 메서드에서 UIImage 객체를 얻습니다. 그 이미지로 SecondViewController의 imageView 속성을 설정하고 내 SecondController의 객체를 Navigation Controller에 푸시합니다. SecondView가로드되지만 이미지가 해당 뷰에 표시되지 않습니다. 코드는 다음과 같습니다 : .....이미지가보기에로드되지 않습니다.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo
{
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
SecondViewController *secondView=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]];
secondView.imageView.image=img;
[self.navigationController pushViewController:secondView animated:YES];
}
은 "img"가 유효한 이미지로 설정되어 있습니까? –
예. 유효한 이미지입니다. – anurag