1、創(chuàng)建一個(gè)UIImageView 并將Image 設(shè)置為要模糊處理的圖片
2、創(chuàng)建UIVisualEffectView并在initwithEffect:方法中添加UIblureEffect對象
3、UIBlurEffect中的effectwithStyle:創(chuàng)建方法中分別是可以傳三個(gè)枚舉類型,代表三種不同的模糊效果
UIblurEffectStyleExtraLight:高亮
UIblurEffectStyleLight:一點(diǎn)亮
UIblurEffectStyleDark:有點(diǎn)暗
4、設(shè)置UIVisualEffectView對象的frame等于UIImageView的frame
5、添加到視圖上(搞定)