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
iOS 14のピッカーあれこれ
Search
akatsuki174
July 01, 2020
Programming
1.7k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOS 14のピッカーあれこれ
CA.swift #12 WWDC20報告会
NDAの関係で中身がすかすかのスライド
akatsuki174
July 01, 2020
Transcript
45 slides
iOS 14ͷϐοΧʔ͋Ε͜Ε CA.swift #12 WWDC20ใࠂձ @akatsuki174
ࣗݾհ
• ਢ౻ຘʢ@akatsuki174ʣ • iOS→AndroidΤϯδχΞ • גࣜձࣾTimersॴଐ • Ұ൪Θ͘Θͨ͘͠ػೳɿWidget
ΞΠεϒϨΠΫ 5
ࠓͷ
࣍ • [New] ColorPicker • [Update] DatePicker
͜ͷࢿྉͷݩʹͳͬͨಈը • Design with iOS pickers, menus and actions •
https://developer.apple.com/videos/play/ wwdc2020/10205
ࠓͷࢿྉ
ࠓͷࢿྉ • NDAతʹΊͳͱ͜ΖΛൈ͔ͯ͠Ξοϓࡁ • TwitterͰྲྀͯ͠·͢ • ΘΓͱ͚ܽͯ͠·ͬͨ… • ϑϧver΄͍͠ਓ͍ͨΒ࿈བྷ͍ͩ͘͞
ColorPicker
ColorPickerͱ • ͦͷ໊ͷ௨Γ৭ΛબΔϐοΧʔ • άϦουɺεϖΫτϧɺεϥΠμʔͳͲΛɹ ͬͯ৭ΛબͰ͖Δ
None
ColorPickerͷ͍͢͝ͱ͜Ζ̍ • ৭อଘͯ͠ผΞϓϦͰ͏͜ͱ͕Ͱ͖Δ
</%"> ৭Λอଘͯ͠Δ༷ࢠΛөͨ͠ಈը
ColorPickerͷ͍͢͝ͱ͜Ζ̎ • εϙΠτπʔϧΛͬͯ৭ΛऔಘͰ͖Δ
</%"> εϙΠτπʔϧΛͬͯΔ༷ࢠΛөͨ͠ಈը
࣮ࡍʹݟͯΈΑ͏ Ϙλϯλοϓ →ColorPickerදࣔ →৭બ →ࢦఆͨ͠ViewͷbackgroundColorΛมߋ
</%"> ΧϥʔϐοΧʔΛಈ͔͍ͯ͠Δ༷ࢠ
</%"ʁ> ࣗͰ࡞ͬͨσϞΞϓϦͷ࣮ίʔυ
selectedColor • બதͷ৭Λද͢ • getter, setter͕͋Δ • setterϐοΧʔىಈ࣌ʹࢦఆ͢ΔͳͲͷ༻్ʁ
supportsAlpha • AlphaεϥΠμʔΛ༻ҙ͢Δ͔Ͳ͏͔
TVQQPSUT"MQIBGBMTF TVQQPSUT"MQIBUSVF </%"ʁ> "MQIBεϥΠμʔͷ༗ແ͕Θ͔ΔεΫγϣ
colorPickerViewController DidSelectColor • ϐοΧʔ্Ͱ৭Λબͨ͠ͱ͖ʹݺΕΔ
colorPickerViewController DidFinish • ϐοΧʔΛดͨ࣌͡ʢӈ্ͷXΛλοϓͨ࣌͠ʣ ʹݺΕΔ
DatePicker
Կ͕৽͘͠ͳͬͨͷ͔ • ίϯύΫτϞʔυɺΠϯϥΠϯϞʔυͰදࣔɹ Ͱ͖ΔΑ͏ʹͳͬͨ • ਖ਼֬ʹɺ.compactiOS 13.4Ҏ߱ • ࣌ؒΩʔϘʔυͰೖྗՄೳ
શछྨ
.compactදࣔ • UIButtonͷΑ͏ͳදࣔΛλοϓͯ͠ɹ ϐοΧʔΛىಈ • ࣌ࠁɺΛϞʔμϧͰબͰ͖Δ • UIͷεϖʔε͕ݶΒΕ͍ͯΔͱ͖ʹศར
</%"> DPNQBDUදࣔ͞ΕͨQJDLFSΛ ಈ͔͍ͯ͠Δ༷ࢠΛөͨ͠ಈը
.inlineදࣔ • ϐοΧʔ͕ͦͷ··ຒΊࠐ·Ε͍ͯΔ • ϞʔμϧΛग़͢ख͕ؒল͚Δ • iPadͳͲεϖʔε͕͍߹ʹ༗ޮ
</%"> JOMJOFදࣔ͞ΕͨQJDLFSͷεΫγϣ
Կ͔ରԠඞཁʁ • UIDatePickerͷAPI·ͬͨ͘ಉ͡·· • iOS 13 SDKͰϏϧυͯ͠ΔݶΓେৎͦ͏ • iOS 14
SDKͰϏϧυͨ͠Β preferredDatePickerStyleʹ.automatic͕ઃఆ ͞Εͯಈ͖͕มΘΔ…ʁ
J04BVUPNBUJD J04BVUPNBUJD </%"> BVUPNBUJDͷ༷ࢠͷҧ͍
ࠓ·Ͱ௨Γʹ͍ͨ͠ͳΒ • preferredDatePickerStyleΛ.wheelsʹ͢Ε ྑͦ͞͏
࣮ࡍʹݟͯΈΑ͏ compact date pickerΛλοϓ →બʢdate, time, dateAndTimeʣ →ܾఆ
</%"> ֤λΠϓͷEBUFQJDLFSΛಈ͔͍ͯ͠Δ༷ࢠΛ өͨ͠ಈը
</%"> 4UPSZCPBSEͷ༷ࢠ
·ͱΊ
·ͱΊ • ColorPicker༷ʑͳ؍͔Β৭ΛબͰ͖Δ • ৽͍͠DatePickerΑΓࣗવͳUIʢओ؍ʣͰɹ ΛબͰ͖Δ
ຊޠࢿྉ
ݟͯͶ • iOS 14ͰมΘΔϐοΧʔͱɺ৽͘͠ొͨ͠ɹ ΧϥʔϐοΧʔ • https://qiita.com/akatsuki174/items/ 56fc648f513d3e92387f 5
એ
iOSDCνέοτൃചதʂʂ • ࠓΦϯϥΠϯ։࠵ • ࠓͳΒΞʔϦʔόʔυ2,000ԁʢ͍҆ʂʣ • ϊϕϧςΟ༣ૹ • ύϯϑϨοτʹԠื͕͋ͬͨݪߘΛܝࡌ •
9/19() ʙ 9/21(݄ॕ)ɺͥͻ͝ࢀՃΛʂ 5
• αʔόʔαΠυΤϯδχΞ (PHP, Golang, AWS) • AndroidΤϯδχΞ (Kotlin) • iOSΤϯδχΞ
(Swift) TimersͰݱࡏΤϯδχΞશ৬छ࠾༻தʂ ৄ͘͠”Timers”Ͱݕࡧ 5
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
More Decks by akatsuki174
See All by akatsuki174
逆向きUIの世界 〜iOSアプリのRTL言語対応〜
akatsuki174
1
760
逆向きUIの世界〜AndroidアプリのRTL言語対応〜
akatsuki174
1
1.3k
私が変えてきたこと、変えなかったこと
akatsuki174
2
1.1k
最近読んでいる本-読書シェア会vol.1
akatsuki174
2
310
SwiftUI、UIKitでキャプチャを撮ろう!
akatsuki174
1
170
Appleにおけるプライバシーの全容を把握する
akatsuki174
0
6.4k
近年のAppleにおける位置情報とプライバシー
akatsuki174
3
540
オフライン勉強会ぼっち対策
akatsuki174
1
760
Xcode 15の新機能
akatsuki174
0
3k
Other Decks in Programming
See All in Programming
Modernizing iOS Apps
seyfoyun
0
150
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
650
SODA - FACT BOOK(JP)
sodainc
1
40k
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
130
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
630
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
300
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
LLM 101
dalinaum
0
480
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
640
My Coaching Mixtape
mlcsv
0
390
Accessibility Awareness
sabderemane
1
300
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
4 Signs Your Business is Dying
shpigford
187
23k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
30 Presentation Tips
portentint
PRO
1
470
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The agentic SEO stack - context over prompts
schlessera
0
1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280