---
title: みんなで Swift 復習会 GO! in 福岡 – 5th′
tags:  #カジュアルswift勉強会 #swift  
author: [熊谷友宏](https://docswell.com/user/es_kumagai)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/GEWD4DD3J2.jpg?width=480
description: みんなで Swift 復習会 GO! in 福岡 – 5th′ で使った発表資料です。これを使って２時間ほどみんなと switch について談笑しました。  ※ Docswell での公開に移行する直前の Slideshare での閲覧数は 418 でした。   ▼ 試験的ストリーミング配信  OP: https://youtu.be/V3dqL5eLRq0  本編: https://youtu.be/X4f4Jw1Cr5Y
published: December 23, 17
canonical: https://docswell.com/s/es_kumagai/Z4VEND-go-171222231406
---
# Page. 1

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

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


# Page. 2

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

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


# Page. 3

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

NPPLNPPLSBEJP NPPL
‫۽‬୩ͱ៸໘͕ϓϩάϥϛϯάίʔυͷ಺͔Β
ௌ͑ͯ͘͜Δ੠ʹࣖΛ܏ָ͚ͯ͠ΉϥδΦ
ຖ݄ୈ̎ɾୈ̐ ݄༵೔ ʹ഑৴
IUUQLFQDNPPLNPPLSBEJPDPN
⾣
ୈ࿩ 
TUBUJD
⾣
ୈ࿩ 
ͳͥ͜ͷ‫ػ‬ೳ͸4XJGUͷ‫͍ͳʹ༷࢓ޠݴ‬ͷʁ
⾣
ୈ࿩ 
ԋࢉࢠ
⾣
ୈ࿩ 
1SPUPDPM0SJFOUFE*OUFHFST
⾣
ୈ࿩ 
$VTUPN4USJOH$POWFSUJCMF
⾣
ୈ࿩ 
0CKFDUJWF$
⾣
ୈ࿩ 
1SPQFSUZͷੈք‫؍‬Λ௫ΜͰΈͨͯ͘
⾣
ୈ࿩ 
‫ޠݴ‬ͷັྗΛ‫ޠ‬Β͏ձ


# Page. 4

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

ಉਓࢽଈചձ


# Page. 5

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

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


# Page. 6

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

ٕज़ॻయ̎ग़ల
ΞΩόɾεΫΤΞ


# Page. 7

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

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


# Page. 8

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

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


# Page. 9

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

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


# Page. 10

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

ٕज़ॻయ̏ग़ల
ΞΩόɾεΫΤΞ


# Page. 11

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

ίϛοΫϚʔέοτग़ల֬ఆʢ౦͖̏Cʣ
౦‫ژ‬ϏοάαΠτ


# Page. 12

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

ΈΜͳͰ
4XJGU ෮शձ(0


# Page. 13

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

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


# Page. 14

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


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


# Page. 15

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


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


# Page. 16

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


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


# Page. 17

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


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


# Page. 18

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


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


# Page. 19

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

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


# Page. 20

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

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


# Page. 21

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

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

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


# Page. 22

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

੍‫ߏޚ‬จ


# Page. 23

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

੍‫ߏޚ‬จ
TXJUDI
⾣ ͕ࣜϚον͢Δ͔ͰॲཧΛ෼‫͢ذ‬Δ
⾣ શͯͷ৔߹Λ໢ཏ͢Δඞཁ͕͋Δ
switch v {
case pattern1:
print(&quot;match 1&quot;)
case pattern2:
print(&quot;match 2&quot;)
default:
print(&quot;others&quot;)
}


# Page. 24

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

੍‫ߏޚ‬จ
TXJUDIͰͷύλʔϯϚονϯά
⾣ ஋͕ύλʔϯʹҰக͢Δ͔Λ൑ఆ͢Δ
⾣ DBTFΩʔϫʔυ಺ͰύλʔϯΛࢦఆ͢Δ
switch device {
case &quot;iPhone 6&quot;:
print(&quot;6&quot;)
case &quot;iPhone 7&quot;, &quot;iPhone 7 PLUS&quot;:
print(&quot;7&quot;)
case let x where x.hasSuffix(&quot;X&quot;):
print(&quot;X&quot;)
default:
print(&quot;?&quot;)
}


# Page. 25

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

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

$POUSPM&#039;MPX &#039;VODUJPOTBOE$MPTVSFT
‫۽‬୩༑޺
IUUQF[OFUKQ
⾣
੍‫ߏޚ‬จ


