daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class ViewController: UIViewController {
  2.  
  3.     var closure : (() -> ()) = { }
  4.  
  5.     override func viewDidLoad() {
  6.         super.viewDidLoad()
  7.         closure = { [unowned self] in
  8.             self.view.backgroundColor = .red
  9.         }
  10.     }
  11.     deinit {
  12.         print("ViewController was deallocated")
  13.     }
  14. }
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