Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
kyotolt23_20190222.pdf
Search
Mitsuharu Emoto
February 22, 2019
0
2.2k
kyotolt23_20190222.pdf
Mitsuharu Emoto
February 22, 2019
Tweet
Share
More Decks by Mitsuharu Emoto
See All by Mitsuharu Emoto
Bluetooth 制御で業務用サーマルプリンター対応アプリを作ろう
mitsuharu
0
22
iOS デバイスから始める Bluetooth 制御の業務用サーマルプリンター対応アプリの作り方
mitsuharu
0
47
iOS 開発で便利なツールたち
mitsuharu
0
210
「ゆめみ大技林 ’24」の紹介
mitsuharu
0
45
Vanilla JavaScript はマルチプラットフォームの夢を見るか
mitsuharu
0
210
技適警察24時
mitsuharu
0
150
iOS アプリ開発におけるデータストリーム超入門
mitsuharu
0
170
オープンソースで作る自己紹介ソリューション
mitsuharu
0
69
発熱から iPhone を守る
mitsuharu
0
110
Featured
See All Featured
The Cult of Friendly URLs
andyhume
77
6k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
327
21k
Optimising Largest Contentful Paint
csswizardry
31
2.9k
Gamification - CAS2011
davidbonilla
80
5k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
GraphQLとの向き合い方2022年版
quramy
43
13k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
BBQ
matthewcrist
85
9.2k
Producing Creativity
orderedlist
PRO
341
39k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Teambox: Starting and Learning
jrom
132
8.7k
Transcript
4XJGUͰ3VOUJNF &YDFQUJPOΩϟον͕͍ͨ͠ ߐຊޫ ,ZPUP-5 !1
ࣗݾհ w ͑ͱΈͭΔ w γʔαʔגࣜձࣾ w J04ΞϓϦͱػցֶशΛ༻͍ͨαʔϏεͷ։ൃ !2
࢝ΊΔલʹ w αϯϓϧίʔυ4XJGUͷॻࣜͰ͢ w γϯϓϧͳͷͰଞݴޠΛͬͯΕ͔ΔఔͰ͢ w ࡶίʔυͳͷͰίʔυࣗମʹҙຯ͋Γ·ͤΜ !3
3VOUJNF&YDFQUJPO w ࣮ߦ࣌ྫ֎ w ίϯύΠϥͰݟ͚ͭΒΕͳ͍ྫ֎ w ΞϓϦ࣮ߦதʹൃੜͨ͠Βɼଈ࣌ʹΫϥογϡ͢Δ w ίʔσΟϯάͰৗʹҙ͖ࣝ͢͜ͱͷͭ !4
ྫ͑ w ྻʹΞΫηε͢Δͱ͖ɼ֬อͨ͠ཁૉҎ্ͷJOEFY ʹΞΫηε͍͚ͯ͠ͳ͍ w ΞΫηε͍ͨ͠JOEFY͕ྻͷཁૉʹؚ·ΕΔ͔Λࣄલʹ ֬ೝ͢Δ͜ͱͰճආͰ͖Δ let temps =
[0, 1, 2] let index = 10 if 0 <= index && index < temps.count{ let temp = temps[index] } let temps = [0, 1, 2] let index = 10 let temp = temps[index] // Ϋϥογϡ !5
ྫ֎ͱίʔσΟϯά w ϥϯλΠϜྫ֎͕ى͜Βͳ͍Α͏ʹࣄલ֬ೝΛߦ͏ඞཁ͕ ͋Δ͕ɼෳࡶͳॲཧ֎తཁҼͳͲͰ͍͠߹͋Δ w Ϣʔβʔ"1*͔Βͷෆఆͳσʔλೖྗ w ͍͔ͭ͘ͷॲཧ͕ॏͳͬͨෳࡶͳγʔϯ w ͍͔ͭ͘ͷϓϩάϥϛϯάݴޠʹىͬͨ͜ྫ֎ΛΩϟο
νͯ͠ɼదͳॲཧͰΫϥογϡͤ͞ͳ͍ػೳ͕͋Δ !6
4XJGUͷྫ֎Ωϟον w ྫ֎ΩϟονUISPXΛ࣮ͨ͠ϝιουʹରͯ͠ɼྫ ֎ΛΩϟονͰ͖Δ w ϥϯλΠϜྫ֎USZDBUDIͰғͬͯΩϟονͰ͖ͳ͍ do{ ɹtry hogehoge() }catch{
... } do{ let temps = [0, 1, 2] try let temp = temps[10] // ϏϧυͰ͖ͳ͍ }catch{ ... } !7
ʘ ?P? ʗ !8
!9
0CKFDUJWF$ͩͱ ΩϟονͰ͖ͯͨΑͶ !10
࡞Γ·ͨ͠ w 0CK$Ͱॲཧ࣮ߦͱىͬͨ͜ ྫ֎Λฦ͢&YD#MPDL w ͦΕΛ4XJGUͰݺͼ·͢ w σϞͰͦͷಈ͖ΛΈ͍ͯͩ͘͞ ExcBlock.execute({ let
temps = [0, 1, 2] print("\(temps[10])") }) { (exception) in print(exception) } !11
μϝͰͨ͠ w 4XJGUͷྫ֎0CK$ͰΩϟονͰ͖ͳ͍ w 0CK$ͰΩϟονग़དྷΔྫ֎/4&YDFQUJPO w 4XJGU͕͛Δྫ֎4XJGU&SSPS !12
͖͋ΒΊͳ͍ w ॲཧ෦0CK$ʹͯ͠͠·͍͍͑ͷͰͳ͍͔ʁ w 5BCMF7JFXͷηϧߋ৽ͷσϞΛ࡞Γ·ͨ͠ // ࣮Πϝʔδ -(void)exc_hogehoge:(Completion)completion{ @try {
[self hogehoge]; } @catch (NSException *exception) { completion(exception); } @finally { } } !13
ΩϟονͰ͖ͨ w ॲཧ෦0CK$ʹͤͨΒɼಈ͍ͨ w ͍ͦΕ͏࣮࣭0CK$ͷίʔυͰʁ !14
͓·͚ w 'PSUJGZ IUUQTHJUIVCDPNKPIOOP'PSUJGZ w ྫ֎ΩϟονͰͳ͘ɼΫϥογϡͨ͠ΞϓϦΛ෮ؼ͞ ͤΔͱ͍͏ຊͷࠇຐज़ w %2Ͱྫ͑ΔͱɼUSZDBUDIʮṫࢮʯʹʮϗΠϛʯͰɼ
'PSUJGZʮ͠ʹʯʹʮβΦϥϧʯ w GBUBM&SSPS͔Β෮ؼͤ͞Δෆࢥٞͳ4XJGUϥΠϒϥϦ'PSUJGZ ΛಡΈղ͘2JJUB IUUQTRJJUBDPNVLJUBLBJUFNT FGFBEGC !15
·ͱΊ w 4XJGUͰϥϯλΠϜྫ֎ΩϟονͰ͖·͢ w 2JJUBʹߘͯ͠·͢IUUQTRJJUBDPN NJUTVIBSV@FJUFNTFEDE w ιʔείʔυͪ͜ΒIUUQTHJUJPGIV/ w 0CK$Λҙࣝͤ͞ͳ͍Α͏ʹϥΠϒϥϦΛ࡞Γ·ͨ͠
w IUUQTHJUIVCDPNNJUTVIBSV.&0&YDFQUJPO !16