Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Radek Pietruszewski | Swifty Methods

Radek Pietruszewski | Swifty Methods

Presented at www.swiftsummit.com

Swift Summit

March 22, 2015

Transcript

75 slides
  1. “Programs must be written for people to read, and only

    incidentally for machines to execute” — Structure and Interpretation of Computer Programs
  2. “Programs must be written for people to read, and only

    incidentally for machines to execute”
  3. let array: [Int] = [10, 6, 2] array.reduce(0, { (acc:

    Int, el: Int) -> Int in return acc + el })
  4. [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector: @selector(foo:) userInfo: nil repeats:

    YES] . . . - (void) foo: (NSTimer *timer) { NSLog(@“Hello world!”) } radex.io/swift/nstimer
  5. NSTimer.schedule(interval: 1.0, target: self, selector: "foo:", userInfo: nil, repeats: true)

    func foo(timer: NSTimer) { println("Hello world") } radex.io/swift/nstimer
  6. [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector: @selector(foo:) userInfo: nil repeats:

    YES] . . . - (void) foo: (NSTimer *timer) { NSLog(@“Hello world!”) } radex.io/swift/nstimer

More Decks by Swift Summit

Other Decks in Programming