我試着從賽格瑞設置UIImageView
,以及由於某種原因,圖像不獲取設置.. 我的繼承人類的.h
文件子類一UIViewController
的UIImageView不設置圖像
@interface PhotoDisplayViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIImageView *photoView;
-(void)setPhoto:(UIImage *)photo;
@end
和繼承人在setPhoto
-(void)setPhoto:(UIImage *)photo{
NSLog(@"PHOTO %@", photo);
_photoView.image = photo;
NSLog(@"MYPHOTO %@", _photoView.image);
}
當我打電話從SEGUE準備setPhoto,我看到這個控制檯
2012-12-16 13:26:22.129 TestApp[2183:907] PHOTO <UIImage: 0x1fd7cd80>
2012-12-16 13:26:22.130 TestApp[2183:907] MYPHOTO (null)
這是爲什麼發生?