iOS 8+ 添加毛玻璃效果

let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.Dark)
let sub = UIVisualEffectView(effect: blurEffect)
sub.frame = UIScreen.mainScreen().bounds
sub.alpha = 0.8
view.addSubview(sub)

你可能感兴趣的:(iOS 8+ 添加毛玻璃效果)