我想继续使用具有 UIImageView 的 photoViewController。在 flickrTVC 中,我说:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"showPhoto"])
{
photoViewController *vc = [segue destinationViewController];
UIImage *photo = [UIImage imageWithContentsOfFile:@"images/en.jpeg"];
[vc setDisplayedPhoto:photo];
}
}
setDisplayedPhoto 方法的实现是:
-(void)setDisplayedPhoto:(UIImage *)image
{
[_imageView setImage:image]; //@property (nonatomic, strong) IBOutlet UIImageView *imageView;
}
但是当我继续时, UIImageView 是白色的......为什么会这样?