在我的主要情节提要我有一个UIViewController
一个隐藏UIImageView
。 我在一个线程,褪色的图像出来,我可以使用下面的代码读取。 我不知道如何扳平UIImageView
我与创建IBAction
。
-(IBAction)popupImage
{
_imageView.hidden = NO;
_imageView.alpha = 1.0f;
// Then fades it away after 2 seconds (the cross-fade animation will take 0.5s)
[UIView animateWithDuration:0.5 delay:2.0 options:0 animations:^{
// Animate the alpha value of your imageView from 1.0 to 0.0 here
_imageView.alpha = 0.0f;
} completion:^(BOOL finished) {
// Once the animation is completed and the alpha has gone to 0.0, hide the view for good
_imageView.hidden = YES;
}];
}
难道我创建了一个@property (strong, nonatomic) IBOutlet UIImageView *imageView;
连接到图像?