介绍
怎么在iOS 8中利用UIBlurEffect实现毛玻璃特效?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
//创建ImageView IImageView * imageView =, [[UIImageView alloc], initWithImage: [UIImage imageNamed: @" 5“]];//,才能创建需要的毛玻璃特效类型 ,/* * ,,*,UIBlurEffectStyleExtraLight, ,,*,UIBlurEffectStyleLight, ,,* UIBlurEffectStyleDark ,,*/UIBlurEffect 才能;* blur =, [UIBlurEffect effectWithStyle UIBlurEffectStyleExtraLight):;//才能添加到要有毛玻璃特效的控件中 UIVisualEffectView 才能;* visual =, [[UIVisualEffectView alloc], initWithEffect:模糊); 时间=visual.frame 才能;imageView.bounds; (才能self.view addSubview: imageView];
(1) UIBlurEffectStyleExtraLight
(2) UIBlurEffectStyleLight
(3) UIBlurEffectStyleDark
关于怎么在iOS 8中利用UIBlurEffect实现毛玻璃特效问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。