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
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
たのしいparse.y
ydah
3
120
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
testcontainers のススメ
sgash708
1
120
Go の GC の不得意な部分を克服したい
taiyow
2
760
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Haze - Real time background blurring
chrisbanes
1
500
Full stack testing :: basic to basic
up1
1
930
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
The Cost Of JavaScript in 2023
addyosmani
45
7k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
BBQ
matthewcrist
85
9.4k
Producing Creativity
orderedlist
PRO
341
39k
Music & Morning Musume
bryan
46
6.2k
GitHub's CSS Performance
jonrohan
1030
460k
How to train your dragon (web standard)
notwaldorf
88
5.7k
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ͷ੍ʹม͠ͳ͍ઃఆ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠