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

Swiftのポイントかいつまみ!

 Swiftのポイントかいつまみ!

個人的に大事だと思うSwiftのポイントかいつまみます。

jollyjoester

August 08, 2015
Tweet

More Decks by jollyjoester

Other Decks in Education

Transcript

  1. • ࣣౡҒ೭ʢͳͳ͠·ͻͰΏ͖ʣ • Repro.Inc / ໺ྑΤϯδχΞ • iPhone / Android

    • Java -> Objective-C -> Swift • ੜ·Ε͸ਆಸ઒ɺ஍ݩ͸ઍ༿ɺ ࣗ୐͸ࢁޱ
  2. TɾOɾC • Constants and Variables • Struct and Class •

    Optionals • Type Constraint • ͓·͚ : Tuples
  3. Struct and Class • struct : ஋౉͠ɺclass : ࢀর౉͠ •

    struct͸ܧঝෆՄ struct : Կ͕خ͍͠ʁ
  4. Struct and Class struct : خ͍͠ͱ͜Ζ • ແବʹՄมͳ෦෼Λগͳ͘͢Δ͜ͱ͕Ͱ͖Δʂ ʢແବʹՄมͳ෦෼͕͋Δͱෳࡶ͕͞૿ͯ͠ෆ۩߹ͷݩʣ ->جຊ͸structͰɻঢ়ଶΛ࣋ͨ͟ΔΛಘͳ͔ͬͨΓܧঝ͕ඞཁͳ৔߹͸

    classͰɻʢܧঝ͸protocolΛ࢖͑͹୅༻Մೳͳ৔߹΋͋ΔΑʣ ஫ҙ఺ • ஋౉͠ͳͷͰͰ͔͍σʔλͷίϐʔ͸ཁ஫ҙ͔΋ʢ࠷దԽ͞ΕͯΔͱ΋ ฉ͘ʣ
  5. Optionals • There is a value, and it equals x

    or • There isn’t value at all Optionals : Կ͕خ͍͠ʁ