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

A Gentle Introduction to Swift Using Playgrounds

Avatar for ron333 ron333
February 04, 2016
59

A Gentle Introduction to Swift Using Playgrounds

MobileTea Meetup - Boston, February 2016

Avatar for ron333

ron333

February 04, 2016

Transcript

  1. A Gentle Introduction to Swift Using Playgrounds Ron Mourant Mobile

    Tea - Boston February 4, 2016 https://medium.com/@ronm333 http://opensourceswift.co Twitter: @ronm333 1
  2. Topics ➤ Swift is different ➤ Fundamental Data Types in

    Swift ➤ Playgrounds in Xcode ➤ Type Inference ➤ Swift likes constants (let) ➤ Swift Arrays (collection type) ➤ Swift Tuples ➤ High Order Functions and Closures ➤ sort(_:) filter(_:) reduce(_: combine:) map(_:) 2
  3. Swift - Fundamental Data Types Int For integer numbers. (8,

    16, 32, or 64 bits) UInt Use for positive numbers. (8, 16, 32, or 64 bits) Float For 32-bit floating-point numbers. Double For 64-bit floating-point numbers. (Default) String For textual data. Bool The values are true or false. 3
  4. Some Functional Aspects in Swift Higher Order Functions - Functions

    that take other functions as arguments Closures - Nameless in-place functions The expression syntax for closures is:
 { (parameters) -> return type in statements } Trailing Closure - A closure written following the calling function’s round brackets 11
  5. Getting Started with Xcode and Swift Downloading Xcode - https://developer.apple.com/xcode/download/

    Resources - https://developer.apple.com/swift/resources/ Get The Swift Programming Language in ePub format.
 https://swift.org/documentation/ Apple’s site for Open Source Swift - https://swift.org Swift in 24 Hours, Sams Teach Yourself (2nd Edition) By B.J. Miller 15