由于 iOS 8 Apple 提供了更简单的方法来制作模糊。但是我可以为它的外观设置动画吗?
CSDTimelineCell* headerCell = (CSDTimelineCell*)[self.timelineTabel cellForRowAtIndexPath:self.headerIndexPath];
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *bluredEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[bluredEffectView setFrame:headerCell.bounds];
[bluredEffectView setHidden: YES];
[headerCell addSubview:(UIView *)bluredEffectView];
[UIView transitionWithView:bluredEffectView
duration:3
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
bluredEffectView.hidden = NO;
} completion:nil];
此类不推荐设置 0 alpha 值。有什么建议么?