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

Swift 2.2 の新機能

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Swift 2.2 の新機能

Avatar for Kazuki Ohara

Kazuki Ohara

April 02, 2016
Tweet

Other Decks in Programming

Transcript

  1. let names = [ "C", "Objective-C", "Swift" ] for name

    in names { print("Hello \(name)!") }
  2. let rhythm = getRhythm() if rhythm == (5, 7, 5)

    { print("haiku") } ͜ͷ͸ΤϥʔʹͳΔ
  3. extension UIView { func insertSubview(view: UIView, at index: Int) func

    insertSubview(view: UIView, aboveSubview siblingSubview: UIView) func insertSubview(view: UIView, belowSubview siblingSubview: UIView) } 4XJGUͰ͸໊લ͸ಉ͡ͰҾ਺ ϥϕϧ͕ҧ͏ؔ਺͕Α͋͘Δ
  4. class NSNotificationCenter { func addObserver(_ observer: AnyObject, selector aSelector: Selector,

    name aName: String?, object anObject: AnyObject?) } 4XJGUͰ͸ϝιουΛࢦఆ͢Δ ͨΊͷηϨΫλͱ͍͏΋ͷΛ ࢖͏͜ͱ͕͋Δ