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

Marc Brown - Swift: The Basics

Marc Brown - Swift: The Basics

Marc Brown presenting at the June 2014 Brooklyn Swift Developers Meetup: http://meetup.com/Brooklyn-Swift-Developers/events/187580592

Video: https://vimeo.com/100767308
Source code: https://github.com/marcdown/SwiftPlayground

More Decks by Brooklyn Swift Developers Meetup

Other Decks in Programming

Transcript

  1. Swift vs. Objective-C Brooklyn Swift Developers Meetup Namespaces • Class

    names scoped to module (ie. framework) • No more class prefixes
  2. Swift vs. Objective-C Brooklyn Swift Developers Meetup Type Safety •

    Compiler performs type checks to find mismatched types • Allows for type inference var heyStr = “Hey”
  3. Swift vs. Objective-C Brooklyn Swift Developers Meetup Closures • Nameless

    function constructed as another function's argument • Equivalent to Blocks numbers.map({ (number: Int) -> Int in let result = 3 * number return result })
  4. Swift vs. Objective-C Brooklyn Swift Developers Meetup Tuples • Group

    multiple values to single value • Supports multiple types let someTuple = (10, true, “Hello”) // type (Int, Bool, String) let anotherTuple = (arg1: 100, arg2: “Hi”) // anotherTuple.arg1, anotherTuple.arg2
  5. Resources Brooklyn Swift Developers Meetup • The Swift Programming Language


    https://itunes.apple.com/us/book/swift-programming-language/ id881256329?mt=11 • WWDC 2014 Videos
 https://developer.apple.com/videos/wwdc/2014 • Ray Wenderlich Tutorials
 http://www.raywenderlich.com/tutorials • Swift Video Tutorials
 http://swiftvideotutorials.com