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
290
Saliency Detection
shtnkgm
0
24
パフォーマンス改善とユニットテスト
shtnkgm
4
1.6k
iOSのコードベースレイアウト
shtnkgm
2
720
20190117_iOSLT_CBLinSwift.pdf
shtnkgm
0
65
SwiftとFunctional Reactive Programming
shtnkgm
0
140
20180710_iOSLT_iOSでDarkModeを実装する
shtnkgm
0
67
20180410_iOSLT_SwiftとProtocol-OrientedProgramming
shtnkgm
0
85
Other Decks in Programming
See All in Programming
Amazon Nova Reelの可能性
hideg
0
200
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
1.4k
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
280
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
150
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Raft: Consensus for Rubyists
vanstee
137
6.7k
How STYLIGHT went responsive
nonsquared
96
5.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
The Language of Interfaces
destraynor
155
24k
Designing for humans not robots
tammielis
250
25k
How GitHub (no longer) Works
holman
312
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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ͷ੍ʹม͠ͳ͍ઃఆ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠