Guest User

Untitled

a guest
Jan 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.light)
  2. let blurEffectView = UIVisualEffectView(effect: blurEffect)
  3. blurEffectView.tintColor = UIColor.green
  4. blurEffectView.tag = 999;
  5. let frame:CGRect = CGRect(x: self.internalView.frame.size.width + self.internalView.frame.origin.x, y: self.drawerView.frame.origin.y, width: self.drawerView.frame.size.width - self.internalView.frame.size.width, height: self.drawerView.frame.size.height)
  6.  
  7. blurEffectView.frame = frame
  8. blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
  9. self.drawerView.insertSubview(blurEffectView, belowSubview: self.btnClose)
  10.  
  11. override func viewDidLoad() {
  12. super.viewDidLoad()
  13.  
  14. let visualEffectView = UIVisualEffectView.init(effect: UIBlurEffect.init(style: .light))
  15. visualEffectView.backgroundColor = UIColor.init(red: 0.0, green: 0.5, blue: 0.0, alpha: 0.5)
  16. visualEffectView.frame = self.view.bounds
  17. self.view.addSubview(visualEffectView)
  18.  
  19. }
  20.  
  21. visualEffectView.backgroundColor = UIColor.init(red: 0.0, green: 0.5, blue: 0.0, alpha: 0.5)
  22.  
  23. blurView.backgroundColor = UIColor.red.withAlphaComponent(0.3)
Add Comment
Please, Sign In to add comment