【发布时间】:2014-05-15 06:41:17
【问题描述】:
根据我在对this question 的回复中读到的内容,以下内容应该有效:
UIImageView *snapshotView = [[UIImageView alloc]initWithFrame:self.window.frame];
[self.container.view addSubview:snapshotView];
for(int i = 1;i < 5; i = i +1){
UIImage *snapshotImage = [self blurredInboxBgImageWithRadius: (i * 5)];
[UIView transitionWithView:snapshotView
duration:2.0f
options:UIViewAnimationOptionCurveLinear
animations:^{
snapshotView.image = snapshotImage;
} completion:nil];
}
但事实并非如此。它根本不会为图像更改设置动画。我错过了什么?
【问题讨论】:
-
您需要在前一个转换的完成块中启动下一个转换,以使它们按顺序发生。
-
这是有道理的——但为什么改变会立即发生而不是两秒钟呢?
标签: objective-c uiview uiimageview uiimage objective-c-blocks