Skip to content

Instantly share code, notes, and snippets.

@qnoid
Created January 22, 2016 12:31
Show Gist options
  • Select an option

  • Save qnoid/7008c4d7abc226d99913 to your computer and use it in GitHub Desktop.

Select an option

Save qnoid/7008c4d7abc226d99913 to your computer and use it in GitHub Desktop.

Revisions

  1. qnoid created this gist Jan 22, 2016.
    11 changes: 11 additions & 0 deletions ViewController.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    class ViewController : UIViewController
    {
    var foo = "foo"

    func hello()
    {
    let closure = { [foo = self.foo] in
    print("Hello \(foo)!")
    }
    }
    }