Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
iOSDC2018_ohayou_kenchan.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ohayoukenchan
August 31, 2018
Programming
4.4k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOSDC2018_ohayou_kenchan.pdf
ohayoukenchan
August 31, 2018
More Decks by ohayoukenchan
See All by ohayoukenchan
iOSDC2021 知られざる課金ステータス
ohayoukenchan
1
8.4k
protect_mutable_state_in_concurrent_Swift_applications.pdf
ohayoukenchan
0
1.5k
Other Decks in Programming
See All in Programming
setup-vp GitLab対応の裏側
naokihaba
0
140
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
200
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
180
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
370
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
210
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
180
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.6k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
510
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Building the Perfect Custom Keyboard
takai
2
890
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Accessibility Awareness
sabderemane
1
230
Docker and Python
trallard
47
4.2k
We Have a Design System, Now What?
morganepeng
55
8.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
310
Transcript
ϑϩϯτΤϯυ͔ΒݟͨiOS։ൃ 2018/08/31 גࣜձࣾϚΠϕετ @ohayou_kenchan
ߴɹݐଠ @ohayou_kenchan HTML/CSS/JavaScriptͱ10͘Β͍ͳ͔Α͠ɻAS3ͱੲ͕ྑ ͔ͬͨɻ Swift3͔ΒiOSͱྑͨ͘͘͠ͳΓiOS։ൃΛ͘Β͍࣮Ͱܦ ݧͨ͠ͷϑϩϯτΤϯυʹͬͨɻ લ৬:Ϧϒηϯε ex స৬ձٞ,࣏ྍnote,స৬φϏiOS ݱ৬:גࣜձࣾϚΠϕετͷϑϩϯτΤϯυ
Copyright © 2017 mybest All rights reserved. CONTENTS mybestͷίϯςϯπΛհ͠·͢ ͪΐͬͱձࣾઆ໌
͍ͤͯͩ͘͞͞
None
Copyright © 2018 mybest All rights reserved. mybestͷಛ ʮ••ʢϞϊͷ໊લʣ×͓͢͢Ίʯʹڧ͍ͨΊɺߪങҙཉͷߴ͍Ϣʔβʔ͕ଟ͘Ӿཡ͍ͯ͠·͢ɻ ֤δϟϯϧͰɺݕࡧॱҐ্͕ҐͷهࣄΛଟอ༗͍ͯ͠·͢ɻ
ʲݕࡧ݁Ռ̍ҐʳϔΞΞΠϩϯ×͓͢͢Ί ओͳ̍Ґͷݕࡧ݁Ռ ϔΞΞΠϩϯ×͓͢͢Ί ϨτϧτΧϨʔ×͓͢͢Ί εϚϗεϐʔΧʔ×͓͢͢Ί νʔΫ×͓͢͢Ί Ϗδωεγϡʔζ×͓͢͢Ί ҥྨενʔϚʔ×͓͢͢Ί ࡊδϡʔε×͓͢͢Ί αʔΩϡϨʔλʔ×͓͢͢Ί Ϧοϓ×͓͢͢Ί ϩʔυόΠΫ×͓͢͢Ί …etc
Copyright © 2018 mybest All rights reserved. mybestͷي 6 20162݄ϩʔϯνޙɺϢʔβʔॱௐʹதͰ͢ɻ݄ؒ1,300ສϢʔβʔಥഁ͍ͯ͠·͢ɻ
݄ؒൢച308,000ݸ ݄ؒൢചֹۚ27.3ԯԁ ग़యɿGoogleAnalyticsʢ20184݄ݱࡏʣ ݄ؒ࠷େϢʔβʔ 1,300ສਓಥഁʂ
͜ͷτʔΫͷΰʔϧ iOSΤϯδχΞʹฉ͍ͯ΄͍͜͠ͱ
྆ํΕͦ͏Ϛϯ ͱ͍͏બࢶ
͘͡ ✘ ϥΠϑαΠΫϧ͕ࣅ͍ͯΔ ✘ async/await͕ࣅ͍ͯΔ ✘ Redux͕ࣅ͍ͯΔ ✘ CSSͱAutoLayout͕ࣅ͍ͯΔ ✘
TypeScriptͱSwift͕ࣅ͍ͯΔ
ϥΠϑαΠΫϧ͕ࣅ͍ͯΔ UIViewControllerͱVueͷίϯϙʔωϯτ ྑ͠ʹͳΕΔ
UIViewController ͷϥΠϑαΠΫϧ ͲΜͳͷ͕͋Γ·͔͢ʁ
( Vue | React )ʹ ͓Μͳ͡ͷ͋Γ·͢ɻ
ϥΠϑαΠΫϧͷൺֱද UIViewController React Vue viewͷಡΈࠐΈ loadView componentWillMount beforeCreated viewͷಡΈࠐΈޙ viewDidLoad
componentDidMount created view͕දࣔ͞ΕΔલ viewWillAppear shouldComponentUpd ate beforeMount view͕දࣔ͞Εͨޙ viewDidAppear - mounted ը໘͔Βফ͑Δલ viewWillDisAppea r compomentWillUnmo unt beforeDestroy ը໘͔Βফ͑ͨޙ viewDidDisappear - destroyed ϨΠΞτ։࢝ viewWillLayoutSu bViews componentWillUpdate beforeUpdate ϨΠΞτऴྃ viewDidLayoutSu bViews componentDidUpdate updated
ϥΠϑαΠΫϧͷൺֱද UIViewController React Vue viewͷಡΈࠐΈ loadView componentWillMount beforeCreated viewͷಡΈࠐΈޙ viewDidLoad
componentDidMount created view͕දࣔ͞ΕΔલ viewWillAppear shouldComponentUpd ate beforeMount view͕දࣔ͞Εͨޙ viewDidAppear - mounted ը໘͔Βফ͑Δલ viewWillDisAppea r compomentWillUnmo unt beforeDestroy ը໘͔Βফ͑ͨޙ viewDidDisappear - destroyed ϨΠΞτ։࢝ viewWillLayoutSu bViews componentWillUpdate beforeUpdate ϨΠΞτऴྃ viewDidLayoutSu bViews componentDidUpdate updated ΄΅ શʹҰக
ϥΠϑαΠΫϧͷൺֱද UIViewController React Vue viewͷಡΈࠐΈ loadView componentWillMount beforeCreated viewͷಡΈࠐΈޙ viewDidLoad
componentDidMount created view͕දࣔ͞ΕΔલ viewWillAppear shouldComponentUpd ate beforeMount view͕දࣔ͞Εͨޙ viewDidAppear - mounted ը໘͔Βফ͑Δલ viewWillDisAppea r compomentWillUnmo unt beforeDestroy ը໘͔Βফ͑ͨޙ viewDidDisappear - destroyed ϨΠΞτ։࢝ viewWillLayoutSu bViews componentWillUpdate beforeUpdate ϨΠΞτऴྃ viewDidLayoutSu bViews componentDidUpdate updated
ϥΠϑ αΠΫϧ͕ ࣅ͍ͯΔͱ͏Ε͍͜͠ͱ
ϥΠϑ αΠΫϧ͕ ࣅ͍ͯΔͱ͏Ε͍͜͠ͱ
ϥΠϑαΠΫϧ ͷऔѻʹ͍ͭͯ
None
UIViewController
UIView
ࣙ৬͍ͨ͠
ྃղͨ͠
ྃղͨ͠
ReactComponent
ReactComponent
ࣙ৬͍ͨ͠
ྃղͨ͠
ྃղͨ͠
ྃղͨ͠
ྃղͨ͠
None
͜ͷষͷ·ͱΊ ✘ VueReactUIViewControllerϥΠ ϑαΠΫϧ͕ࣅ͍ͯΔ ✘ ϥΠϑαΠΫϧͷϝιουϑοΫͨ͠ ͱ͖ʹॲཧΛΠϝʔδ͍͢͠ ✘ ϥΠϑαΠΫϧ͕ͤ͋͘ΔͷͰҙ
$ npm init react-app [app-name]
async/await͕ࣅ͍ͯΔ
https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619
None
None
΄΅ શʹҰக
JavaScriptͷඇಉظॲཧ
Generator ! next() IteratorΦϒδΣΫ τ next()ΛݺͿ͜ͱͰ ࣍ͷyield·Ͱॲཧ Λ͢Δ͜ͱ͕ग़དྷΔ ! yeild
ॲཧΛதஅͰ͖ɺ ผͷॲཧ͔Β෮ؼ ͨ͠ΓͰ͖Δ ! done() ฦΓ͕return͞ Εͨͱ͖δΣωϨ ʔλ͕done͞ΕΔ function*એݴ GeneratorΦϒδΣΫτΛ࣋ͭGeneratorؔʹͳΔ
Generatorͷྫ
Promise ! Pending ඇಉظૢ࡞͕ྃ ͍ͯ͠ͳ͍ ! fulfilled ૢ࡞͕ྃ͠ɺ Promise͕Λ1ͭ ࣋ͭ
resolveΛฦ͢ ! Rejected ૢ࡞͕Τϥʔ·ͨ ࣦഊͰऴྃͨ͠ rejectedΛฦ͢ কདྷ͑ΔΑ͏ʹͳΔͳʹ͔ʢʣ then, catch ͰνΣΠϯͰ͖ΔಛੑΛͭʢthenable)
Promiseͷྫ
async/await async ඇಉظؔΛఆٛ͢Δؔએݴ ؔͷલʹasyncΛ͚ͭΔ͜ͱͰඇ ಉظؔΛఆٛ͢Δ asyncؔݺͼग़͞ΕΔͱ PromiseΛฦ͢ async͕ؔΛreturnͨ͠߹ PromiseΓΛresolve͢Δ async͕ؔྫ֎Λthrowͨ͠߹
ͦͷΛreject͢Δ await async functionͰPromiseͷ݁Ռ ʢresolveɺrejectʣ͕ฦ͞ΕΔ·Ͱ ػ͢Δ awaitΛࢦఆ͢Δͱɺͦͷؔͷ Promiseͷ݁Ռ͕ฦ͞ΕΔ·Ͱػ ͢Δɻ
async/awaitͷྫ
Async/Await for Swift ͱCoroutineϞσϧ
https://speakerdeck.com/sys1yagi/kotlin-korutinwo-li-jie-siyou
͜ͷষͷ·ͱΊ ✘ async/awaitࣅ͍ͯΔ ✘ JavaScriptGeneratorɺPromiseɺ async/awaitͱ͍ΖΜͳॻ͖ํͰඇಉظ ॲཧ͕ॻ͚Δ ✘ Async/Await for
Swift Swiftʹίϧʔ νϯΛͨΒ͢ͷ
Redux͕ࣅ͍ͯΔ
None
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/ ΞϓϦͷͭ ঢ়ଶ།Ұͭ
https://bumbu.me/simple-redux/ ActionʹΑΓঢ়ଶΛͲ͏มߋ͞ ͤΔ͔Reducer͕͓͜ͳ͏
https://bumbu.me/simple-redux/ ঢ়ଶΛมߋͤ͞Δʹ ඞͣactionΛൃߦͤ͞ͳ͚ΕͳΒͳ͍
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/
https://bumbu.me/simple-redux/ Ҏ্
ReduxͷΑ͞
Reduxఫୀ
ࣄۀεέʔϧͱRedux
্ཱͪ͛ॳͷίϯςΩετ ✘ Ϣʔβʔ͕ථग़དྷΔػೳ͕΄͍͠ ✘ Ұཡͱৄࡉը໘͕ཉ͍͠ ✘ ථ݁ՌʹίϝϯτͰ͖ΔΑ͏ʹͨ͠ ͍ʢΘ͍Θ͍ͯ͠Δײ͕͡ཉ͍͠ʣ ✘ ΠέͯΔΑ͏ʹ݁ՌΛՄࢹԽ͍ͨ͠
✘ ͳΜͱͳ͘ྑͦ͞͏ͳਓʹ࣭Λ࡞ ͢Δ͜ͱΛڐՄ͍ͨ͠
্ཱͪ͛ॳͷίϯςΩετ ✘ Ϣʔβʔ͕ථग़དྷΔػೳ͕΄͍͠ ✘ Ұཡͱৄࡉը໘͕ཉ͍͠ ✘ ථ݁ՌʹίϝϯτͰ͖ΔΑ͏ʹͨ͠ ͍ʢΘ͍Θ͍ͯ͠Δײ͕͡ཉ͍͠ʣ ✘ ΠέͯΔΑ͏ʹ݁ՌΛՄࢹԽ͍ͨ͠
✘ ͳΜͱͳ͘ྑͦ͞͏ͳਓʹ࣭Λ࡞ ͢Δ͜ͱΛڐՄ͍ͨ͠
্ཱͪ͛ॳͷίϯςΩετ ✘ Ϣʔβʔ͕ථग़དྷΔػೳ͕΄͍͠ ✘ Ұཡͱৄࡉը໘͕ཉ͍͠ ✘ ථ݁ՌʹίϝϯτͰ͖ΔΑ͏ʹͨ͠ ͍ʢΘ͍Θ͍ͯ͠Δײ͕͡ཉ͍͠ʣ ✘ ΠέͯΔΑ͏ʹ݁ՌΛՄࢹԽ͍ͨ͠
✘ ͳΜͱͳ͘ྑͦ͞͏ͳਓʹ࣭Λ࡞ ͢Δ͜ͱΛڐՄ͍ͨ͠
্ཱͪ͛ॳͷίϯςΩετ ✘ Ϣʔβʔ͕ථग़དྷΔػೳ͕΄͍͠ ✘ Ұཡͱৄࡉը໘͕ཉ͍͠ ✘ ථ݁ՌʹίϝϯτͰ͖ΔΑ͏ʹͨ͠ ͍ʢΘ͍Θ͍ͯ͠Δײ͕͡ཉ͍͠ʣ ✘ ΠέͯΔΑ͏ʹ݁ՌΛՄࢹԽ͍ͨ͠
✘ ͳΜͱͳ͘ྑͦ͞͏ͳਓʹ࣭Λ࡞ ͢Δ͜ͱΛڐՄ͍ͨ͠
্ཱͪ͛ॳͷίϯςΩετ ✘ Ϣʔβʔ͕ථग़དྷΔػೳ͕΄͍͠ ✘ Ұཡͱৄࡉը໘͕ཉ͍͠ ✘ ථ݁ՌʹίϝϯτͰ͖ΔΑ͏ʹͨ͠ ͍ʢΘ͍Θ͍ͯ͠Δײ͕͡ཉ͍͠ʣ ✘ ΠέͯΔΑ͏ʹ݁ՌΛՄࢹԽ͍ͨ͠
✘ ͳΜͱͳ͘ྑͦ͞͏ͳਓʹ࣭Λ࡞ ͢Δ͜ͱΛڐՄ͍ͨ͠
ͪΐͬͱԿݴͬͯΔ͔Θ͔Βͳ͍ Motivation
None
ͬͺΓҰཡ͍ΒͶ
None
None
None
None
None
اըऀ͕;Θͬͱͨ͠ஈ֊ͩͱ ͦͷਓͷҙਤͰઃܭࠨӈ͞ΕΔ
Α͍ઃܭ ͱʁ
ReSwiftΊΔ͜ͱʹͳͬͯ Ҿ͖ଓ͖εέʔϥϏϦςΟͷ͋Δઃ ܭΛʂ
͜ͷষͷ·ͱΊ ✘ ReduxΛ֮͑ΔͳΒ͋ͷgifΛͣͬͱΈ Α͏ ✘ ReSwiftฏқʹReduxΛ࣮ݱग़དྷΔ ✘ ඇಉظॲཧMiddleWareʹಀ͕ͦ͏ ✘ ఫୀͰ͖Δมߋʹڧ͍ઃܭΛʂ
TypeScript͕ࣅ͍ͯΔ
Compile Error [] + [] = “”
let
const
TypeAnnotation
interface
type
any
Array of type
͜ͷষͷ·ͱΊ ✘ TypeScript΄΅Swift
CSS͕ࣅ͍ͯΔ
CSS ≒ AutoLayout
CSSʹର͢Δҙࣝௐࠪɹʢࣗௐʣ
ͳͥCSSͱ͍͏֓೦͕Զͨ ͪͷ৺ΛΘͤͳ͍ͷ͔
ͻͱͭΊ
༏͗ͯ͢͠ٯʹҤ͑Δ
None
CSS੍ໃ६Λڐ༰͢Δ ݁Ռɺ่ΕΔ
;ͨͭΊ
ΩϥΩϥωʔϛϯά
None
CSSઃܭͷ؊໋໊نଇ ͕ͩɺ໋໊نଇΛΤϥʔΛग़ͯ͘͠Ε ͠ͳ͍
CSS-Grid-modules
None
None
Styled-components
None
None
Ϋϥε໊͏ؾʹ͠ͳ ͓̺ͯ͘
https://github.com/danilowoz/react-atomic-design
https://polaris.shopify.com/
https://polaris.shopify.com/
https://polaris.shopify.com/
https://polaris.shopify.com/
CSS ≒ AutoLayout
Component binded CSS ≒ AutoLayout
͜ͷষͷ·ͱΊ ✘ CSSͰϨΠΞτ่Εͦ͏ͳͱ͖ CSS-GridLayout ✘ ໋໊نଇߟ͑Δͷ͕ਏ͍ͱ͖ StyledComponentΛ͓͏ ✘ AutoLayout੍่͕ΕΔͱΒͤͯ ͘ΕΔʢCSSΏΔ;Θ
શମͷ·ͱΊ ✘ ϥΠϑαΠΫϧ͕ࣅͯΔ ✘ async/await,Promise,Generator ✘ Redux ͋ͷgifಈըΛ಄ʹ͍ΕΑ͏ ✘ TypeAnotation
✘ CSS-grid-modulesͱstyled-components
શମͷ·ͱΊ ✘ ϥΠϑαΠΫϧ͕ࣅ͍ͯͨ ✘ async/await͕ࣅ͍ͯͨ ✘ Redux͕ࣅ͍ͯͨ ✘ CSSͱAutoLayout͕ࣅ͍ͯͨ ✘
TypeScriptͱSwift͕ࣅ͍ͯͨ
શମͷ·ͱΊ ✘ ϥΠϑαΠΫϧ͕ࣅ͍ͯͨ ✘ async/await͕ࣅ͍ͯͨ ✘ Redux͕ࣅ͍ͯͨ ✘ CSSͱAutoLayout͕ࣅ͍ͯͨ ✘
TypeScriptͱSwift͕ࣅ͍ͯͨ
શମͷ·ͱΊ ✘ ϥΠϑαΠΫϧ͕ࣅ͍ͯͨ ✘ async/await͕ࣅ͍ͯͨ ✘ Redux͕ࣅ͍ͯͨ ✘ CSSͱAutoLayout͕ࣅ͍ͯͨ ✘
TypeScriptͱSwift͕ࣅ͍ͯͨ
શମͷ·ͱΊ ✘ ϥΠϑαΠΫϧ͕ࣅ͍ͯͨ ✘ async/await͕ࣅ͍ͯͨ ✘ Redux͕ࣅ͍ͯͨ ✘ CSSͱAutoLayout͕ࣅ͍ͯͨ ✘
TypeScriptͱSwift͕ࣅ͍ͯͨ
༨ஊͰ͢
༨ஊͰ͢
None
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ Any questions? ✘ @ohayou_kenchan ✘
[email protected]