SHARE
TWEET

Untitled

a guest Aug 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. override func viewDidLayoutSubviews() {
  2.  
  3.     // Add the logo hd background image and apply blur effect
  4.     // in viewDidLayoutSubviews, the blur effect is correctly done after changing the orientation of the iPhone
  5.  
  6.     let backgroundImage = UIImage(named: "logo-hd")
  7.     let imageView = UIImageView(image: backgroundImage)
  8.     self.tableView.backgroundView = imageView
  9.     tableView.backgroundView?.contentMode = .scaleAspectFit
  10.  
  11.     let blurEffect = UIBlurEffect(style: UIBlurEffect.Style.light)
  12.     let blurView = UIVisualEffectView(effect: blurEffect)
  13.     blurView.frame = imageView.bounds
  14.     imageView.addSubview(blurView)
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top