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
メーカー製 SDK は不要!標準フレームワークだけで作るサーマルプリンターの印刷アプリ
mitsuharu
0
12
Bluetooth 制御で業務用サーマルプリンター対応アプリを作ろう
mitsuharu
0
29
iOS デバイスから始める Bluetooth 制御の業務用サーマルプリンター対応アプリの作り方
mitsuharu
0
52
iOS 開発で便利なツールたち
mitsuharu
0
210
「ゆめみ大技林 ’24」の紹介
mitsuharu
0
50
Vanilla JavaScript はマルチプラットフォームの夢を見るか
mitsuharu
0
220
技適警察24時
mitsuharu
0
170
iOS アプリ開発におけるデータストリーム超入門
mitsuharu
0
180
オープンソースで作る自己紹介ソリューション
mitsuharu
0
73
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Practical Orchestrator
shlominoach
186
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Unsuck your backbone
ammeep
668
57k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
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