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
20170613_iOSLT_UIKitにおけるViewLifecycle
Search
shtnkgm
June 13, 2017
Programming
0
70
20170613_iOSLT_UIKitにおけるViewLifecycle
shtnkgm
June 13, 2017
Tweet
Share
More Decks by shtnkgm
See All by shtnkgm
Combine入門
shtnkgm
2
250
Property Wrappers
shtnkgm
0
280
Saliency Detection
shtnkgm
0
23
パフォーマンス改善とユニットテスト
shtnkgm
4
1.5k
iOSのコードベースレイアウト
shtnkgm
2
700
20190117_iOSLT_CBLinSwift.pdf
shtnkgm
0
62
SwiftとFunctional Reactive Programming
shtnkgm
0
140
20180710_iOSLT_iOSでDarkModeを実装する
shtnkgm
0
62
20180410_iOSLT_SwiftとProtocol-OrientedProgramming
shtnkgm
0
81
Other Decks in Programming
See All in Programming
C++でシェーダを書く
fadis
6
4.1k
初めてDefinitelyTypedにPRを出した話
syumai
0
420
Jakarta EE meets AI
ivargrimstad
0
150
Realtime API 入門
riofujimon
0
150
Click-free releases & the making of a CLI app
oheyadam
2
120
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Jakarta EE meets AI
ivargrimstad
0
690
Arm移行タイムアタック
qnighy
0
340
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
110
CSC509 Lecture 11
javiergs
PRO
0
180
CSC509 Lecture 09
javiergs
PRO
0
140
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Become a Pro
speakerdeck
PRO
25
5k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
For a Future-Friendly Web
brad_frost
175
9.4k
Why Our Code Smells
bkeepers
PRO
334
57k
Rails Girls Zürich Keynote
gr2m
94
13k
Optimizing for Happiness
mojombo
376
70k
Unsuck your backbone
ammeep
668
57k
Gamification - CAS2011
davidbonilla
80
5k
Site-Speed That Sticks
csswizardry
0
28
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
The Cult of Friendly URLs
andyhume
78
6k
Transcript
6*,JUʹ͓͚Δ 7JFX-JGFDZDMF 4IPUB/BLBHBNJ!TIUOLHN
6*࣮࣌ͷΑ͋͘Δ՝ w ͳΜ͔εΫϩʔϧ͕ΧΫΧΫ͢ΔɺҾ͔͔ͬΔ w "VUP-BZPVU͕ޮ͔ͳ͍ w 7JFXͷදࣔҐஔ͕͓͔͍͠ɺදࣔ͞Εͳ͍ w ը໘දࣔ·Ͱ͕͍
Α͋͘Δσόοά w 6*ߋ৽ΛαϒεϨου͔ΒϝΠϯεϨουʹมߋ ʢ௨৴ॲཧͷίʔϧόοΫ௨ͳͲʣ 㱺9DPEFͰ.BJO5ISFBE$IFDLFSͰ νΣοΫՄ w Կ͔Α͘Θ͔Βͳ͍͚ͲɺMBZPVU*G/FFEFEͱ͔ॻ ͍ͨΒΔ
6*,JUͰͷ7JFXͷ දࣔॲཧʹؔ͢Δ͕ࣝඞཁ
7JFX-JGFDZDMFʹؔ͢Δϝιου VQEBUF$POTUSBJOUT*G/FFEFE TFU/FFET-BZPVU VQEBUF$POTUSBJOUT TFU/FFET6QEBUF$POTUSBJOUT MBZPVU4VCWJFXT ESBX TFU/FFET%JTQMBZ MBZPVU*G/FFEFE WJFX%JE-PBE
MPBE7JFX WJFX8JMM"QQFBS VQEBUF7JFX$POTUSBJOUT WJFX8JMM-BZPVU4VCWJFXT WJFX%JE-BZPVU4VCWJFXT
ଟ͍ʂʘ ?P? ʗ
େ·͔ͳྲྀΕ w 7JFXͷಡΈࠐΈ w ੍ͷՃʢ"VUP-BZPVUʣ w ੍Λݩʹ7JFXͷGSBNFΛܭࢉʢϨΠΞτʣ w GSBNFͷҐஔʹඳըʢϨϯμϦϯάʣ
αϯϓϧϓϩδΣΫτ Λͭͬͯ͘ॲཧΛͬͯΈΔ IUUQTHJUIVCDPNTIUOLHN7JFX-JGFDZDMF4BNQMF
̏ຕϏϡʔΛॏͶ͚ͨͩ ʢΧελϜ6*7JFXʣ ԼͷϏϡʔ͔Βॱʹ ɾ8IJUF7JFX ʢTFMGWJFXʣ ɾ3FE7JFX ʢ8IJUF7JFXͷTVCWJFXʣ ɾ#MVF7JFX ʢ3FE7JFXͷTVCWJFXʣ
Ϋϥε໊ͱϝιου໊Λ ֤ϝιουݺͼग़࣌͠ʹϩάग़ྗ
7JFXͷදࣔ·Ͱͷ ϩάग़ྗ݁Ռ
ඳը ϨΠΞτ ੍ߋ৽ ϏϡʔͷಡΈࠐΈ
֤ϝιουͷઆ໌ 6*7JFX
੍ͷߋ৽ʹؔ͢Δϝιου w VQEBUF$POTUSBJOUT ੍ͷߋ৽Λ࣮ߦ ։ൃऀ͕ݺͼग़͢ͷ/( w TFU/FFET6QEBUF$POTUSBJOUT ੍ߋ৽ͷ࣮ߦཁ൱ͷϑϥάΛཱͯΔ
ܭࢉ࣮ߦλΠϛϯάγεςϜͤ w VQEBUF$POTUSBJOUT*G/FFEFE ੍ߋ৽Λଈ࠲ʹ࣮ߦʢߋ৽ϑϥά͋Εʣ
ύϑΥʔϚϯεͷྑ͍ॱ w PWFSSJEFͨ͠VQEBUF$POTUSBJOUT Ͱ੍ߋ৽ ʢϨΠΞτΤϯδϯͷόονॲཧʹؚ·Εɺϝ ΠϯεϨουΛϒϩοΫ͠ͳ͍ʣ w ੍ߋ৽ޙʹTFU/FFET6QEBUF$POTUSBJOUT ʢΤϯδϯ͕·ͱΊͯߋ৽ॲཧΛ࣮ࢪʣ
w ੍ߋ৽ޙʹVQEBUF$POTUSBJOUT*G/FFEFE ʢଈ࣮࣌ߦͷͨΊɺόονॲཧʹؚ·Εͳ͍ʣ
ϨΠΞτʹؔ͢Δϝιου w MBZPVU4VCWJFXT GSBNFͷߋ৽Λ࣮ߦ ։ൃऀ͕ݺͼग़͢ͷ/( w TFU/FFET-BZPVU GSBNFߋ৽ཁ൱ͷϑϥάΛཱͯΔ
ܭࢉ࣮ߦλΠϛϯάγεςϜͤ w MBZPVU*G/FFEFE GSBNFߋ৽Λଈ࠲ʹ࣮ߦʢߋ৽ϑϥά͋Εʣ
ύϑΥʔϚϯεͷྑ͍ॱ w PWFSSJEFͨ͠MBZPVU4VCWJFXT ͰGSBNFߋ৽ ʢϨΠΞτΤϯδϯͷόονॲཧʹؚ·Εɺ ϝΠϯεϨουΛϒϩοΫ͠ͳ͍ʣ w GSBNFߋ৽ޙʹTFU/FFET-BZPVU ʢΤϯδϯ͕·ͱΊͯߋ৽ॲཧΛ࣮ࢪʣ
w GSBNFߋ৽ޙʹMBZPVU*G/FFEFE ʢଈ࣮࣌ߦͷͨΊɺόονॲཧʹؚ·Εͳ͍ʣ
ඳըʹؔ͢Δϝιου w ESBX ։ൃऀ͕ݺͼग़͍͚ͯ͠ͳ͍ $PSF(SBQIJDTΛͬͯը໘ʹඳը͢Δ w TFU/FFET%JTQMBZ ඳըߋ৽ͷ࣮ߦཁ൱ͷϑϥάΛཱͯΔ
w ੍ϨΠΞτߋ৽ͷΑ͏ʹɺ ଈ࣮࣌ߦ༻ͷϝιουͳ͠
Ϗϡʔ֊ͱ࣮ߦॱং w ੍ࢠ7JFX͔Β w ϨΠΞτ7JFX͔ Β
͜͜·Ͱͷ·ͱΊʢ7JFXʣ w ੍ VQEBUF$POTUSBJOUT ύϑΥʔϚϯε͕ඞཁͳ߹ͳͲʹPWFSSJEF͢Δ TFU/FFET6QEBUF$POTUSBJOUT ߋ৽ϑϥά VQEBUF$POTUSBJOUT*G/FFEFE ଈ࣌ߋ৽ w
ϨΠΞτ MBZPVU4VCWJFXT ύϑΥʔϚϯε͕ඞཁͳ߹ͳͲʹPWFSSJEF͢Δ TFU/FFET-BZPVU ߋ৽ϑϥά MBZPVU*G/FFEFE ଈ࣌ߋ৽ w ඳը ESBX ύϑΥʔϚϯε͕ඞཁͳ߹ͳͲʹPWFSSJEF͢Δ TFU/FFET%JTQMBZ ߋ৽ϑϥά
֤ϝιουͷઆ໌ 6*7JFX$POUSPMMFS
MPBE7JFX w ཧ͢Δ7JFXΛಡΈࠐΉʢTFMGWJFXʣ w 4UPSZ#PBSEͰ࣮͢Δ߹PWFSSJEFෆཁ
WJFX%JE-PBE w MPBE7JFX ͕ྃͨ͠ࡍʹݺΕΔ w 7$ͷදࣔαΠΫϧͰҰ͚ͩݺΕΔͨΊɺ ΫϥεͰར༻͢ΔΦϒδΣΫτͷॳظԽͳͲʹద͢Δ
WJFX8JMM"QQFS w Ϗϡʔ͕දࣔ͞ΕΔલʹݺΕΔ w ॳճදࣔҎ֎ʹόοΫάϥϯυ෮ؼɺλϒ Γସ͑ͳͲ
VQEBUF7JFX$POTUSBJOUT w αϒϏϡʔͷ੍ߋ৽ޙɺTFMGWJFXͷ੍ߋ৽ ͕ඞཁͳࡍʹݺΕΔ w TFMGWJFXͷVQEBUF$POTUSBJOUT ͕ݺΕΔ w PWFSSJEFͰͷར༻༻్͋·Γͳ͠ʁ
WJFX8JMM-BZPVU4VCWJFXT w ϏϡʔͷϨΠΞτΛ։࢝͢ΔલʹݺΕΔ ʢॳظදࣔ࣌ը໘ճస࣌ͳͲʣ w ϏϡʔͷMBZPVU4VCWJFX ͕࣮ߦ͞ΕΔ
WJFX%JE-BZPVU4VCWJFXT w ϏϡʔͷϨΠΞτ͕ྃͨ͠ࡍʹݺΕΔ ʢෳճݺΕΔͷͰɺΦϒδΣΫτͷॳظԽͳͲ ʹ͔ͳ͍ʣ w TFMGWJFXGSBNF͜ͷϝιουΑΓલͩͱ֬ఆ͠ ͍ͯͳ͍ w WJFX%JE-PBE
ͳͲͰTFMGWJFXGSBNFΛ༻͍ͯϨΠ Ξτ͢Δͱҙਤ͢ΔϨΠΞτͱͳΒͳ͍Մೳੑ ͋Γ
WJFX%JE"QQFS w Ϗϡʔ͕දࣔ͞ΕͨޙʹݺΕΔ w WJFX8JMM"QQFS ಉ༷ɺόοΫάϥϯυ෮ؼ࣌ λϒΓସ͑࣌ͳͲෳճݺΕΔ w طʹ6*ද͕͍ࣔྃͯ͠ΔͷͰɺ6*දࣔʹؔ ͷͳ͍ॲཧΛ࣮ߦ͢Δͷʹద͢Δʢϩάૹ৴ͳ
Ͳʣ
͜͜·Ͱͷ·ͱΊʢ7$ʣ w WJFX%JE-BZPVU4VCWJFXT ͷ࣮ߦ·ͰGSBNF ͕֬ఆ͍ͯ͠ͳ͍ͨΊɺҙ͕ඞཁ w WJFX͕දࣔ͞ΕΔɺWJFX%JE"QQFS ͷ࣮ߦ·Ͱ 6*ؔ࿈Ҏ֎Ͱͷίετͷ͔͔ΔॲཧͳΔ ͘͠ͳ͍
"QQFOEJY
2੍Λߋ৽ͨ͠ΒͲ͏ͳΔʁ w ͍Ϗϡʔͱ੨͍Ϗϡʔͷ੍Λߋ৽ w ؔ࿈͢ΔϏϡʔͷTFU/FFET-BZPVU͕ݺΕΔ w ϑϥάཱ͕ͬͯɺMBZPVU4VCWJFXT͕ݺΕΔ ʢϨΠΞτΤϯδϯͷߋ৽λΠϛϯάʣ
2εΫϩʔϧ͕ΧΫͭ͘ w TDSPMM7JFX%JE4DSPMM ͳͲͰϨΠΞτߋ৽Λ ଈ࣮࣌ߦͯ͠ͳ͍͔νΣοΫ w ϏϡʔͷϨΠΞτௐ͕ϝΠϯεϨουΛϒ ϩοΫͯ͠͠·͍ɺεΫϩʔϧͷͨΊͷϨΠΞ τௐ͕ࢭ·͍ͬͯΔՄೳੑ͋Γ w
MBZPVU4VCWJFXT ΛPWFSSJEF͢Δͱྑ͍͔
2"VUP-BZPVUͰͷ Ξχϝʔγϣϯ͕ಈ͔ͳ͍ w GSBNFͰͷΞχϝʔγϣϯͱҧ͍ɺ ϒϩοΫ֎ʹߋ৽ॲཧΛॻ͘ ɾଈ࣌ߋ৽Λߦ͏ͨΊɺϒϩοΫͰlayoutIfNeeded()Λ ϨΠΞτΛଈ࣮࣌ߦ ʢGSBNF͕ܾఆʣ
2ίʔυͰ੍ΛՃͨ͠Βɺ ίϯϑϦΫτͨ͠ "VUP3FTJ[JOH.BTL༝དྷͷ ੍͕ࠞࡏ
w USBOTMBUFT"VUPSFTJ[JOH.BTL*OUP$POTUSBJOUT ΛແޮԽ w σϑΥϧτͰઃఆ͞ΕΔ"VUPSFTJ[JOHΛ "VUP-BZPVUͷ੍ʹม͠ͳ͍ઃఆ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠