【发布时间】:2014-07-21 13:51:33
【问题描述】:
看起来很简单,但我无法使用我尝试的所有不同方法。
我要做的就是在打开新视图控制器时从黑色背景中淡入图像。
到目前为止,我已经尝试过:
//I've set the image alpha to 0 on the storyboard already
- (void)viewDidLoad
{
[UIView animateWithDuration:5.0
delay:0
options: UIViewAnimationOptionCurveEaseIn
animations:^{
myImage.alpha = 1;
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
}
它运行,图像立即出现(只是似乎没有动画!)
我知道这是一个简单的问题,但我已经花了几个小时寻找解决方案。
如果有人可以提供帮助,将不胜感激!
谢谢!
【问题讨论】:
标签: ios objective-c cocoa-touch uiimageview