Slide 1

Slide 1 text

Introduction to Swift Deep Dive. ۚ 第2弾クラスメソッドのモバイル開発を知る!第1回〜iOS編

Slide 2

Slide 2 text

"CPVUNF

Slide 3

Slide 3 text

wΫϥεϝιουגࣜձࣾ w෱ԬΦϑΟεॴଐ wϞόΠϧΞϓϦαʔϏε෦ wϞόΠϧΞϓϦΤϯδχΞ wαʔόʔαΠυΞϓϦΤϯδχΞ wαʔόʔϨε։ൃ෦ wΞϓϦέʔγϣϯΤϯδχΞ ాத޹໌ @kongmingtrap

Slide 4

Slide 4 text

೥໨

Slide 5

Slide 5 text

೥໨

Slide 6

Slide 6 text

೥໨

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

ࣾ֎׆ಈ

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

ϚχΞοΫͳൃද͕͋ͬͨΓ͢ΔͷͰ ͦͷҰ෦Λ͝঺հͰ͖Ε͹ͱࢥ͍·͢

Slide 11

Slide 11 text

w"#*ʹ͍ͭͯ w4*-ʹ͍ͭͯ wඇಉظॲཧʹ͍ͭͯ ࠓճ࿩͢͜ͱ

Slide 12

Slide 12 text

"#*

Slide 13

Slide 13 text

"QQMJDBUJPO#JOBSZ *OUFSGBDF

Slide 14

Slide 14 text

"QQMJDBUJPO#JOBSZ*OUFSGBDF wΦϒδΣΫτίʔυϨϕϧͷΠϯλʔϑΣʔ εΛࢦ͢ wޓ׵"#*Λαϙʔτ͢ΔγεςϜؒͰɺಉ͡ ࣮ߦϑΝΠϧΛมߋແ͠Ͱಈ࡞ͤ͞Δ࢓૊Έ

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

--7. wίϯύΠϧ࣌ɺϦϯΫ࣌ɺ࣮ߦ࣌ͳͲ͋ΒΏΔ ࣌఺ͰϓϩάϥϜΛ࠷దԽ͢ΔΑ͏ઃܭ͞Εͨ ίϯύΠϥج൫ wԾ૝ϚγϯΛλʔήοτͱͨ͠தؒίʔυ ʢϏοτίʔυʣΛੜ੒͠ɺͦͷԾ૝Ϛγϯ޲ ͚ίʔυΛಛఆͷϚγϯͷػցޠʹม׵͢Δ w4XJGUίϯύΠϥͷόοΫΤϯυʹར༻

Slide 17

Slide 17 text

--7.Λܰྔͳ··ʹอͪଓ͚͍ͯΔେ͖ͳಛ௃ ͕͋Δ ϥΠϒϥϦΛ࢖͏ΫϥΠΞϯτଆ͔Βݟ Δͱࢍ൱྆࿦͕͋Δ ɻͦΕ͸ɺաڈͷܾஅ΋ੵۃ తʹݟ௚ͯ͠ɺաڈͱͷޓ׵ੑΛؾʹͤͣʹ"1* Λେ͖͘มߋ͍ͯ͘͠ͱ͍͏͜ͱͩɻ --7.ͷ఩ֶ 5IF"SDIJUFDUVSFPG0QFO4PVSDF"QQMJDBUJPOT೔ຊޠ༁

Slide 18

Slide 18 text

4XJGUͷ"#*͸ ҆ఆԽ͍ͯ͠ͳ͍

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

ʊਓਓਓਓਓਓਓਓਓʊ ʼɹ$POWFSU'BJMFEɹʻ ʉ:?:?:?:?:?:?:?:?:?ʉ

Slide 21

Slide 21 text

IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT"#*4UBCJMJUZ.BOJGFTUPNE 4XJGU"#*4UBCJMJUZ.BOJGFTUP

Slide 22

Slide 22 text

4XJGU"#*4UBCJMJUZ.BOJGFTUPΛಡΉ ࢀߟࢿྉ

Slide 23

Slide 23 text

IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT"#*4UBCJMJUZ.BOJGFTUPNE "#*҆ఆԽͷجຊํ਑ wΑΓ৽͍͠ίϯύΠϥ͕ݹ͍όʔδϣϯͷ4XJGUͰ ॻ͔ΕͨίʔυΛίϯύΠϧͰ͖Δ͜ͱ w৽͍͠4XJGUόʔδϣϯʹҠߦ͢Δࡍʹ4XJGU։ൃ ऀ͕௚໘͢ΔҠߦͷ௧ΈΛܰݮ͢Δ wιʔεͷޓ׵ੑʹΑΓɺύοέʔδ࡞੒ऀ͸ɺෳ਺ ͷ4XJGUόʔδϣϯʹΘͨͬͯ୯Ұͷίʔυϕʔε Λҡ࣋͠ͳ͕ΒɺϢʔβʔ͸৽͍͠όʔδϣϯͷ 4XJGUΛ࢖༻Ͱ͖ΔΑ͏ʹͳΔ

Slide 24

Slide 24 text

IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT"#*4UBCJMJUZ.BOJGFTUPNE "#*҆ఆԽͷجຊํ਑ wόΠφϦϑϨʔϜϫʔΫͱϥϯλΠϜͷޓ׵ੑ ʹΑΓɺෳ਺ͷ4XJGUόʔδϣϯͰಈ࡞͢Δό ΠφϦܗࣜͷϑϨʔϜϫʔΫΛ഑෍͢Δ wόΠφϦϑϨʔϜϫʔΫʹ͸ɺϑϨʔϜϫʔΫ ͷ"1*ͷιʔεϨϕϧͷ৘ใΛ఻ୡ͢Δ4XJGU ϞδϡʔϧϑΝΠϧͱɺ࣮ߦ࣌ʹϩʔυ͞ΕΔ ίϯύΠϧࡁΈͷ࣮૷Λఏڙ͢Δڞ༗ϥΠϒϥ Ϧͷ྆ํؚ͕·ΕΔ

Slide 25

Slide 25 text

IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT"#*4UBCJMJUZ.BOJGFTUPNE "#*҆ఆޙ w"#*҆ఆޙͷ҆ఆੑʹ͓͍ͯɺΑΓੵۃతͳϨΠ Ξ΢τվળ͕ൃ໌͞ΕΔՄೳੑ͕͋Γ·͢ɻͨͱ ͑͹ɺ֎෦λΠϓͷσʔλϝϯόʔΛ࢖༻ͯ͠ω ετ͞ΕͨλΠϓͷσʔλϝϯόʔΛฒ΂ସ͑ͨ ΓɺύοΩϯάͨ͠Γ͢Δ͜ͱ͕Ͱ͖·͢ɻͦͷ Α͏ͳվળ͸ɺల։λʔήοτ͓Αͼ·ͨ͸࠷খ όʔδϣϯνΣοΫΛհͯ͠"#*BEEJUJWFͳ΍Γ ํͰߦΘΕͳ͚Ε͹ͳΒͳ͍ɻ͜Ε͸ɺϞδϡʔ ϧϑΝΠϧ͕λΠϓ͝ͱͷ"#*όʔδϣϯ৘ใΛ τϥοΩϯά͢Δඞཁ͕͋Δ͜ͱΛҙຯ͠·͢ɻ

Slide 26

Slide 26 text

"#*҆ఆޙ 4XJGU"#*4UBCJMJUZ.BOJGFTUPΛಡΉ

Slide 27

Slide 27 text

"#*҆ఆޙ 4XJGU"#*4UBCJMJUZ.BOJGFTUPΛಡΉ

Slide 28

Slide 28 text

"#*҆ఆԽ͸ඞਢཁ݅ wຊདྷ͸4XJGUͰऔΓೖΕΒΕΔ͸͕ͣॱԆ wίʔυΛอक͍ͯ͘͠ϓϩδΣΫτʹͱͬͯɺ ֎෦ϥΠϒϥϦͷϝϯςφϯεͷίετΛԼ ͛Δ͜ͱ͕Ͱ͖Δ w4XJGUͰͷ౥ࡌʹ޲͚ͯɺ4XJGUͳͲ Ͱ0XOFSTIJQपΓͷ੔උ͞Ε͍ͯΔ

Slide 29

Slide 29 text

4*-

Slide 30

Slide 30 text

4XJGU*OUFSNFEJBUF -BOHVBHF IUUQTHJUIVCDPNBQQMFTXJGUCMPCNBTUFSEPDT4*-STU

Slide 31

Slide 31 text

w4XJGU︎︎︎︎︎︎︎︎︎︎︎︎︎︎︎︎ʹಛԽͨ͠ߴ౓ͳҙຯ৘ใΛ࣋ͭ 44" 4UBUJD4JOHMF"TTJHONFOU੩త ୯Ұ୅ೖ ܗࣜͷ*3 *OUFSNFEJBUF 3FQSFTFOUBUJPOதؒදݱ w࠷΋େ͖ͳػೳɾ໾ׂ͸࠷దԽ 4*-

Slide 32

Slide 32 text

4XJGUͷίϯύΠϧ IUUQMMWNPSHEFWNUHTMJEFT(SP⒎-BUUOFS4*-)JHI-FWFM*3QEG

Slide 33

Slide 33 text

4XJGUͷίϯύΠϧ 4XJGUίʔυ ߏจղੳ 4*- 0CKFDU 4*-ੜ੒ ҙຯղੳ ৄࡉղੳ --7.*3ੜ੒ --7.*3 "45 ந৅ߏจ໦

Slide 34

Slide 34 text

wιʔείʔυͷจࣈྻΛτʔΫϯʹ෼͚ʢࣈ ۟ղੳʣɺग़དྷΔݶΓม਺ͳͲͷࢀরΛղ ্ܾͨ͠Ͱ"45ʢந৅ߏจ໦ʣΛग़ྗ͢Δ ߏจղੳ

Slide 35

Slide 35 text

wߏจղੳͰղܾͰ͖ͳ͔ͬͨม਺ͳͲͷࢀ রͷղܾɺϝϯόʔݺͼग़͠ͷղܾɺܕਪ࿦ɺ ܕνΣοΫΛߦ͏ ҙຯղੳ

Slide 36

Slide 36 text

wҙຯղੳޙʹ--7.*3ʹམͱ͠ࠐΉͷͰ͸ ͳ͘ɺಠࣗͷதؒදݱͰ͋Δ4*-Λੜ੒͢Δ w4*-ͷੜ੒͸"45Λ૸ࠪͯ͠ߦΘΕΔ 4*-ੜ੒

Slide 37

Slide 37 text

֤޻ఔ͝ͱͷ݁Ռ͸ΦϓγϣϯͰࢦఆ IUUQTHJUIVCDPNLPOHNJOHTUSBQ4XJGU'J[[#V[[

Slide 38

Slide 38 text

4*-ʹग़ྗͯ͠ΈΔ TXJGUDFNJUTJMp[[CV[[TXJGU

Slide 39

Slide 39 text

4*-ʹग़ྗͯ͠ΈΔ

Slide 40

Slide 40 text

4*-ʹग़ྗͯ͠ΈΔ TXJGUDFNJUTJMp[[CV[[TXJGU

Slide 41

Slide 41 text

4*-ʹग़ྗͯ͠ΈΔ

Slide 42

Slide 42 text

wࣗ෼͕ॻ͍ͨίʔυ͕ͲͷΑ͏ʹॲཧ͞Ε ͍ͯ͘ͷ͔Λ஌Δ͜ͱ͕Ͱ͖Δ wύϑΥʔϚϯεվળͷࡍʹٞ࿦ͷωλʹͳ Δ ίϯύΠϧͷ݁ՌΛಡΉ͜ͱʹΑͬͯ

Slide 43

Slide 43 text

<1%'>4XJGU*OUFSNFEJBUF-BOHVBHF.FNPSZ1SPNPUJPO IUUQTLJUBTVLFCPPUIQNJUFNT

Slide 44

Slide 44 text

ඇಉظॲཧ

Slide 45

Slide 45 text

IUUQTHJTUHJUIVCDPNMBUUOFSCGCEDGD "TZOD"XBJUGPS4XJGU

Slide 46

Slide 46 text

ඇಉظॲཧͰ ؕΓ͕ͪͳ໰୊ͨͪ

Slide 47

Slide 47 text

ӡ໋ͷϐϥϛου

Slide 48

Slide 48 text

ӡ໋ͷϐϥϛου ୯७ͳγʔέϯεॲཧΛΫϩʔδϟͰܨ͛ ͯ͠·͏ͱɺਂ͍ωετ͕ൃੜ͠ɺϐϥϛο υͷΑ͏ͳ֊૚ʹͳͬͯ͠·͏

Slide 49

Slide 49 text

ΤϥʔϋϯυϦϯά

Slide 50

Slide 50 text

ΤϥʔϋϯυϦϯά Τϥʔॲཧͷهड़͕৑௕ʹͳΔ ʢίʔϧόοΫϕʔεͷ৔߹ʣ

Slide 51

Slide 51 text

$PNQMFUJPO)BOEMFSͷ࢖͍Ͳ͜Ζ

Slide 52

Slide 52 text

$PNQMFUJPO)BOEMFSͷ࢖͍Ͳ͜Ζ ඇಉظ"1*Λఆٛ͠ʢ$PNQMFUJPO)BOEMFSΛ࢖༻ʣɺଟ ͘ͷ"1*ΛϒϩοΫ͢Δ͜ͱ͕Ͱ͖ͨͱͯ͠΋ɺ6*͕བྷΉ ෦෼͸ಉظͰ΍Β͟ΔΛಘͳ͍

Slide 53

Slide 53 text

wඇಉظॲཧͷߏจ wॱ൪ʹ݁Ռ͕ඞཁͳඇಉظॲཧΛهड़ w༷ʑͳݴޠʹΤοηϯε͕औΓࠐ·Ε͍ͯ Δ w'VUVSF1SPNJTFͩͱ൥ࡶʹͳΔ৔߹ͷه ड़ΛΑΓ؆ܿʹͰ͖ΔΑ͏ʹͨ͠ ͦ΋ͦ΋"TZOD"XBJUͱ͸

Slide 54

Slide 54 text

wඇಉظॲཧͷ࠷ऴతͳ׬ྃ΋͘͠͸ࣦഊΛ ද͢৔߹ɺॻ͖ํʹΑͬͯ͸൥ࡶʹͳΔ 1SPNJTF doSomething().then(function(result) { return doSomethingElse(result); }) .then(function(newResult) { return doThirdThing(newResult); }) .then(function(finalResult) { console.log('Got the final result: ' + finalResult); }) .catch(failureCallback);

Slide 55

Slide 55 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"TZOD

Slide 56

Slide 56 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"TZOD

Slide 57

Slide 57 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"TZOD "TZODͷࢦఆͰ໭Γ஋͕ඇಉظ Ͱฦ͞ΕΔ͜ͱΛࣔ͢

Slide 58

Slide 58 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"XBJU

Slide 59

Slide 59 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"XBJU

Slide 60

Slide 60 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"XBJU

Slide 61

Slide 61 text

"TZOD"XBJUGPS4XJGU 4XJGUͷ"XBJU ඇಉظॲཧͷ݁Ռ͕ฦͬͯ͘Δ ·Ͱ଴ػͤ͞Δ

Slide 62

Slide 62 text

"TZOD"XBJUGPS4XJGU #FGPSF

Slide 63

Slide 63 text

"TZOD"XBJUGPS4XJGU "GUFS

Slide 64

Slide 64 text

͞ΒͳΔԠ༻

Slide 65

Slide 65 text

w4DBMBͰ͸͓ͳ͡Έͷܕ wऴ͍ྃͯ͠Δ͔Ͳ͏͔Θ͔Βͳ͍ॲཧ݁Ռ Λந৅Խͨ͠ܕ w'VUVSF͸ະདྷͷ݁ՌΛද͢ܕ 'VUVSF

Slide 66

Slide 66 text

val f: Future[List[String]] = Future { session.getRecentPosts } f onFailure { case t => println("エラーが発⽣生した: " + t.getMessage) } f onSuccess { case posts => for (post <- posts) println(post) } 'VUVSF

Slide 67

Slide 67 text

"TZOD"XBJUGPS4XJGU 'VUVSFΛ4XJGUͰ࣮ݱ

Slide 68

Slide 68 text

'VUVSFΛ4XJGUͰ࣮ݱ "TZOD"XBJUGPS4XJGU

Slide 69

Slide 69 text

w4XJGUͷݴޠ։ൃऀͳΒͰ͸ͷࢹ఺Ͱɺඇಉ ظॲཧʹؔ͢ΔΞϓϩʔν͕هࡌ͞Ε͍ͯΔ wϓϩϙʔβϧͱ͸΂ͭʹ'VUVSFܕʹ͍ͭͯ ͷ࣮૷ྫ͕هࡌ͞Ε͍ͯΔ "TZOD"XBJUGPS4XJGUͷϓϩϙʔβϧ

Slide 70

Slide 70 text

ॴײ

Slide 71

Slide 71 text

w4XJGUͷൃల͸௥ָ͍͍ͬͯͯ͠ wݴޠͷίϛϡχςΟ͸ɺͨ·ʹϚχΞοΫ ͳ࿩୊͕Ͱ͖ͯͨΓ͢ΔͷͰୀ۶͠ͳ͍ wJ04NBD04Ҏ֎Ͱ΋4XJGUͷ׆༂ͷ৔͕ ޿͕ͬͯཉ͍͠ ॴײ

Slide 72

Slide 72 text

w"#*҆ఆԽʹ͍ͭͯ w4XJGU*OUFSNFEJBUF-BOHVBHF.FNPSZ 1SPNPUJPO w4XJGUͰࣗ࡞ίϯύΠϥΛ࡞ͬͨ࿩ w4XJGU"#*4UBCJMJUZ.BOJGFTUPΛಡΉ w4XJGUͷதؒݴޠ4*-ΛಡΉͦͷ4*-ʹೖ໳ ͢ΔͨΊͷ४උ ࢀߟจݙ

Slide 73

Slide 73 text

એ఻

Slide 74

Slide 74 text

͔͔ͤͬͩ͘Β ෱Ԭʹߦͬͯ 4XJGUͰϫΠϫΠ ΍Γ͍ͨ

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

ͦͷΠϕϯτ୯ମͩͱ ݫ͍͠ํ͸ʜ

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

4XJGU΋ςετ΋ ໘ന͍ʂ ΋ͬͱ৭ʑͳݴޠͷ ษڧΛ͍ͨ͠ʜ

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

͋Γ͕ͱ͏͍͟͝·ͨ͠