我有UIImage
这样模糊的:
myImageView.image = UIImage(named: imageSet[0])
let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.Light)
blurEffectView = UIVisualEffectView(effect: blurEffect)
blurEffectView?.frame = view.bounds
myImageView.addSubview(blurEffectView!)
然后我想像这样淡入新的 UIImage:
UIView.transitionWithView(self.backgroundImageView,
duration:1.0,
options: UIViewAnimationOptions.TransitionCrossDissolve,
animations: { self.myImageView.image = UIImage(named: self.imageSet[randomInt]
},
completion: nil)
问题是,新图像只是出现,而不是淡入。如果我禁用模糊,图像会淡入淡出。我做错了什么?