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
260
Property Wrappers
shtnkgm
0
280
Saliency Detection
shtnkgm
0
23
パフォーマンス改善とユニットテスト
shtnkgm
4
1.5k
iOSのコードベースレイアウト
shtnkgm
2
710
20190117_iOSLT_CBLinSwift.pdf
shtnkgm
0
63
SwiftとFunctional Reactive Programming
shtnkgm
0
140
20180710_iOSLT_iOSでDarkModeを実装する
shtnkgm
0
64
20180410_iOSLT_SwiftとProtocol-OrientedProgramming
shtnkgm
0
82
Other Decks in Programming
See All in Programming
Spatial Rendering for Apple Vision Pro
warrenm
0
110
Haze - Real time background blurring
chrisbanes
1
510
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
210
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
1.2k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
290
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
선언형 UI에서의 상태관리
l2hyunwoo
0
170
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
190
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Recoilを剥がしている話
kirik
5
6.8k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Building an army of robots
kneath
302
44k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Navigating Team Friction
lara
183
15k
Producing Creativity
orderedlist
PRO
341
39k
Designing for Performance
lara
604
68k
A Philosophy of Restraint
colly
203
16k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
A better future with KSS
kneath
238
17k
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ͷ੍ʹม͠ͳ͍ઃఆ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠