---
title: みんなで Swift 復習会 GO! in 福岡・発表資料
tags:  #swift #swift愛好会 #swift day! #カジュアルswift勉強会  
author: [熊谷友宏](https://www.docswell.com/user/es_kumagai)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/47M41VDKEW.jpg?width=480
description: みんなで Swift 復習会 GO! in 福岡で使った発表資料です。これを使って２時間弱ほどを談笑しながら楽しんでました。  ※ Docswell での公開に移行する直前の Slideshare での閲覧数は 618 でした。
published: October 14, 17
canonical: https://www.docswell.com/s/es_kumagai/K3G3J1-go-171014052042
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/47M41VDKEW.jpg)

4XJGU%BZʂ
4XJGU Λ‫ָ͠ʹ··ؾ‬Ή̍೔ؒ
ʷ
TXJGU@EBZ


# Page. 2

![Page Image](https://bcdn.docswell.com/page/P7RWL246E9.jpg)

4XJGU%BZ
4XJGU%BZͱ͸
⾣ ؔ౦ͷ̎ͭͷษ‫ڧ‬ձͰ‫ڞ‬ಉ։࠵
w ‫ޕ‬લͷ෦ΈΜͳͰ4XJGU෮शձ(0
w ‫ޙޕ‬ͷ෦4XJGUѪ޷ձ
⾣ ट౎‫ݍ‬Ҏ֎Ͱ։͘4XJGUίϛϡχςΟʔ
w 4XJGU%BZͱͯ͠͸ɺୈ̎ճ໨ͷ։࠵
w 4XJGU෮शձ(0ͱͯ͠͸ɺୈ̐ճ໨ͷ։࠵
TXJGU@EBZ


# Page. 3

![Page Image](https://bcdn.docswell.com/page/PJXPWD2DEX.jpg)

‫ޕ‬લͷ෦
ʙ


# Page. 4

![Page Image](https://bcdn.docswell.com/page/3JKDVXMD7D.jpg)

ΈΜͳͰ
4XJGU ෮शձ
(0JO෱Ԭ rUI⒌
#minna_de_swift #swift_day
ΧδϡΞϧ 4XJGU ϓϩάϥϛϯά


# Page. 5

![Page Image](https://bcdn.docswell.com/page/LE3RM5YP75.jpg)

‫۽‬୩༑޺
5PNPIJSP,VNBHBJ
⾣
4XJGU‫͕ޠݴ‬௒େ޷͖Ͱ͢ʂ
⾣
ΈΜͳͰָ͠Ήษ‫ڧ‬ձ͕େ޷͖Ͱ͢ʂ
⾣
ϓϩάϥϛϯάͷָ͠͞Λ఻͍͖͍͑ͯͨɻ
w ωοτϥδΦ
w ษ‫ڧ‬ձͷ஍ํ։࠵
w ಉਓࢽଈചձ


# Page. 6

![Page Image](https://bcdn.docswell.com/page/8EDY6D53EG.jpg)

NPPLNPPLSBEJP NPPL
‫۽‬୩ͱ៸໘͕ϓϩάϥϛϯάίʔυͷ಺͔Β
ௌ͑ͯ͘͜Δ੠ʹࣖΛ܏ָ͚ͯ͠ΉϥδΦ
ຖ݄ୈ̎ɾୈ̐ ݄༵೔ ʹ഑৴
IUUQLFQDNPPLNPPLSBEJPDPN
⾣ ୈ࿩
$VTUPN4USJOH$POWFSUJCMF
⾣ ୈ࿩
0CKFDUJWF$
⾣ ୈ࿩
1SPQFSUZͷੈք‫؍‬Λ௫ΜͰΈͨͯ͘
⾣ ୈ࿩
‫ޠݴ‬ͷັྗΛ‫ޠ‬Β͏ձ
⾣ ୈ࿩
JOUFSGBDFͱQSPUPDPM
⾣ ୈ࿩
͋ͷ೔Έͨ&quot;OZͱ!PCKDΛɺ΋͏͍ͪͲɻ
⾣ ୈ࿩
!PCKD


# Page. 7

![Page Image](https://bcdn.docswell.com/page/V7P6YXGPJ8.jpg)

ಉਓࢽଈചձ


# Page. 8

![Page Image](https://bcdn.docswell.com/page/2JV3GL6VEQ.jpg)

ίϛοΫϚʔέοτग़ల
౦‫ژ‬ϏοάαΠτ


# Page. 9

![Page Image](https://bcdn.docswell.com/page/5EG38XN17L.jpg)

ٕज़ॻయ̎ग़ల
ΞΩόɾεΫΤΞ
ٕज़ॻΦϯϦʔಉਓࢽଈചձ
૯དྷ৔ऀ਺  ໊


# Page. 10

![Page Image](https://bcdn.docswell.com/page/4JQ598QN7P.jpg)

௒ٕज़ॻయग़ల
ઍ༿ɾນுϝοη
!χίχί௒ձٞ


# Page. 11

![Page Image](https://bcdn.docswell.com/page/K749X2N3E1.jpg)

ίϛοΫϚʔέοτग़ల
౦‫ژ‬ϏοάαΠτ


# Page. 12

![Page Image](https://bcdn.docswell.com/page/LJ1KNM5Z7G.jpg)

J04%$+&quot;1&quot;/ϒʔεग़ల
 ʙ !ૣҴాେֶ
ϓνಉਓࢽଈചձ
ϓν4XJGU-BC


# Page. 13

![Page Image](https://bcdn.docswell.com/page/GJWD435672.jpg)

ٕज़ॻయ̏ग़ల֬ఆʢ͑ʣ
ΞΩόɾεΫΤΞ


# Page. 14

![Page Image](https://bcdn.docswell.com/page/4EZG2VNRJ3.jpg)

ΈΜͳͰ
4XJGU ෮शձ(0


# Page. 15

![Page Image](https://bcdn.docswell.com/page/Y76YV581EV.jpg)

ΈΜͳͰ4XJGU෮शձ
෮शձ(0ͱ͸
⾣ ΈΜͳͰ4XJGU෮शձ
w ͔ͤͬ͘ͳΒΈΜͳͱҰॹʹ෮श͍ͨ͠
ͦ͏ࢥͬͯ౦‫ژ‬ɾौ୩Ͱ࢝Ίͨษ‫ڧ‬ձ
⾣ ΈΜͳͰ4XJGU෮शձ(0͸ɺͦͷग़ு൛
w ौ୩ͷ֎ʹ΋ษ‫ڧ‬ձͷָ͠͞Λ޿Ί͍ͨ
w ࠓճͰ̐ճ໨
w ͜Ε·Ͱࡳຈ ԭೄ ઋ୆Ͱ։࠵


# Page. 16

![Page Image](https://bcdn.docswell.com/page/G75GDY9L74.jpg)


ΈΜͳͰ4XJGU෮शձ
(0JOࡳຈ rTU⒌
ཱ໾ऀएྛେ‫͞ޗ‬Μ


# Page. 17

![Page Image](https://bcdn.docswell.com/page/9J2Y8G23JR.jpg)


4XJGU%BZ!ԭೄ
ΈΜͳͰ4XJGU෮शձ(0JOԭೄ rOE⒌
ཱ໾ऀ‫ۄ‬৓৴‫͞ޛ‬Μ


# Page. 18

![Page Image](https://bcdn.docswell.com/page/DEYG6VY8EM.jpg)


ΈΜͳͰ4XJGU෮शձ
(0JOઋ୆ rSE⒌
ཱ໾ऀాத‫࣏͞ݡ‬Μ


# Page. 19

![Page Image](https://bcdn.docswell.com/page/VJNGZMP978.jpg)


ΈΜͳͰ4XJGU෮शձ
(0JO෱Ԭ rUI⒌
ཱ໾ऀాத޹໌͞Μ


# Page. 20

![Page Image](https://bcdn.docswell.com/page/YE9WZN33E3.jpg)

ΈΜͳͰ4XJGU෮शձ
ஊস‫ࣜܗ‬
⾣ ΈΜͳͱ4XJGUΛ෮श͍ͨ͠
⾣ ͔ͤͬ͘ͳͷͰஊস͠ͳ͕Β
⾣ ͍ͭͰ΋࿩͔͚ͯ͘͠Εͯ0,


# Page. 21

![Page Image](https://bcdn.docswell.com/page/GE8N1KML7D.jpg)

ΈΜͳͰ4XJGU෮शձ
৺͕͚
⾣ ΈΜͳ஌ͬͯΔɺ͸ࢥ͍ࠐΈ
⾣ ࣗ৴΍֬ূ͸ɺແͯ͘େৎ෉
⾣ ͳΜͱͳͦ͘͏ࢥ͏ɺେ‫ܴ׻‬


# Page. 22

![Page Image](https://bcdn.docswell.com/page/LELPQZ3Q7R.jpg)

ΈΜͳͰ4XJGU෮शձ(0
&quot;4XJGU5PVS

ΈΜͳͰ4XJGU෮शձ
‫۽‬୩༑޺
IUUQF[OFUKQ
4XJGU


# Page. 23

![Page Image](https://bcdn.docswell.com/page/4JM41VMK7W.jpg)

੍‫ߏޚ‬จ


# Page. 24

![Page Image](https://bcdn.docswell.com/page/PJRWL2V679.jpg)

੍‫ߏޚ‬จ
4XJGUͷ੍‫ߏޚ‬จ
⾣ ৚݅෼‫ذ‬ʜif, switch
⾣ ‫܁‬Γฦ͠ʜfor-in, while, repeat-while
⾣ ৚݅ࣜΛ‫ׅͰހؙׅ‬Δ͔͸ࣗ༝
⾣ ॲཧϒϩοΫΛ೾‫ׅͰހׅ‬Δͷ͸ඞਢ


# Page. 25

![Page Image](https://bcdn.docswell.com/page/PEXPWDZD7X.jpg)

੍‫ߏޚ‬จ
JG
⾣ ৚͕݅ਅِ͔͔ͰॲཧΛ෼‫͢ذ‬Δ
⾣ ৚݅ʹࢦఆͰ͖Δͷ͸#PPM‫͚ͩܕ‬
if condition1 {
}
else if condition2 {
}
else {
}


# Page. 26

![Page Image](https://bcdn.docswell.com/page/3EKDVX8DJD.jpg)

੍‫ߏޚ‬จ
0QUJPOBM#JOEJOHT
⾣ Φϓγϣφϧ‫͕ܕ‬஋Λ͍࣋ͬͯΕ͹ਅͱͳΔ
⾣ ஋ΛऔΓग़ͯ͠ɺϒϩοΫ಺Ͱ࢖͑Δ
if let path = Bundle.main.path(
forResource: &quot;data&quot;, ofType: &quot;txt&quot;) {
}
else {
}


# Page. 27

![Page Image](https://bcdn.docswell.com/page/L73RM52PJ5.jpg)

੍‫ߏޚ‬จ
/JM݁߹ԋࢉࢠ
⾣ Φϓγϣφϧ‫͕ܕ‬஋Λ͍࣋ͬͯΕ͹ɺͦΕΛऔಘ͢Δ
⾣ ஋Λ͍࣋ͬͯͳ͚Ε͹ɺӈଆͷ஋Λऔಘ͢Δ
let number = Int(string) ?? -1


# Page. 28

![Page Image](https://bcdn.docswell.com/page/87DY6DZ37G.jpg)

&amp;OKPZ4XJGU
5IBOLZPV
ΈΜͳͰ4XJGU෮शձ(0
 &quot;4XJGU5PVS

$POUSPM&#039;MPX &#039;VODUJPOTBOE$MPTVSFT
‫۽‬୩༑޺
IUUQF[OFUKQ
⾣
੍‫ߏޚ‬จ
⾣
0QUJPOBM#JOEJOHT
⾣
/JM݁߹ԋࢉࢠ
⾣
ύλʔϯϚον
⾣
ؔ਺ఆٛ
⾣
Մม௕Ҿ਺


