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
アイフォンX、凹みを切るか?凹みを使うか? ~iPhoneX対応のススメ~
Search
Keisuke Tatsumi
October 18, 2017
Technology
13
11k
アイフォンX、凹みを切るか?凹みを使うか? ~iPhoneX対応のススメ~
CA.swift #4 (
https://cyberagent.connpass.com/event/66850/
)での発表資料です。
Keisuke Tatsumi
October 18, 2017
Tweet
Share
More Decks by Keisuke Tatsumi
See All by Keisuke Tatsumi
Cross Deviceチームにおけるスマートテレビアプリ開発ってどんな感じ?
cokaholic
0
370
AbemaTV×Keirin AR
cokaholic
2
3.4k
アイフォンX、凹みを切るか?凹みを使うか? ~iPhoneX対応のススメ in 2018~
cokaholic
0
170
とある端末の触覚技術 -フィードバック-
cokaholic
0
3.3k
ゼロから始める ARKit
cokaholic
0
220
ゼロから始める Drag and Drop
cokaholic
1
1.1k
Other Decks in Technology
See All in Technology
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
Engineer Career Talk
lycorp_recruit_jp
0
150
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
Platform Engineering for Software Developers and Architects
syntasso
1
520
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
169
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Optimizing for Happiness
mojombo
376
70k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Cult of Friendly URLs
andyhume
78
6k
For a Future-Friendly Web
brad_frost
175
9.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Transcript
CA.swift #4 2017/10/18 Keisuke Tatsumi ~iPhoneXରԠͷεεϝ~
Keisuke Tatsumi • iOS engineer at AbemaTV, Inc. • Github,
Qiita : cokaholic • Twitter : @TK_u_nya • AppStore : Keisuke Tatsumi
None
ຊͷςʔϚ…
iPhoneXରԠ
Agenda • What’s iPhoneX • What’s Safe Area • How
To “TRUE” Support iPhoneX • Summary
Agenda • What’s iPhoneX • What’s Safe Area • How
To “TRUE” Support iPhoneX • Summary
What’s iPhoneX • 9݄12ʹ։࠵͞ΕͨApple Special Eventʹ ͯൃද͞Εͨ࠷৽ͷiPhone
One more thing…
None
৽ܕiPhoneΩλʔʂ
What’s iPhoneX • 9݄12ʹ։࠵͞ΕͨApple Special Eventʹ ͯൃද͞Εͨ࠷৽ͷiPhone
What’s iPhoneX • 9݄12ʹ։࠵͞ΕͨApple Special Eventʹ ͯൃද͞Εͨ࠷৽ͷiPhone • ϕθϧϨεσΟεϓϨΠ
None
͓Θ͔Γ͍͚ͨͩͨͩΖ͏͔ʁ
None
͑…͜Ε…ԜΈͷ෦ɺ͘Ͷʁ
ͦ͜Ͱొ͢Δͷ͕...
Safe Area
Agenda • What’s iPhoneX • What’s Safe Area • How
To “TRUE” Support iPhoneX • Summary
What’s Safe Area API Roadmap • Apple͕iOS11͔Βಋೖͨ֓͠೦
What’s Safe Area API Roadmap • Apple͕iOS11͔Βಋೖͨ֓͠೦ • φϏήʔγϣϯόʔεςʔλεόʔͳͲͷ֎ ଆͷUIʹඃΒͳ͍҆શͳྖҬΛऔಘͰ͖Δ
What’s Safe Area API Roadmap • Apple͕iOS11͔Βಋೖͨ֓͠೦ • φϏήʔγϣϯόʔεςʔλεόʔͳͲͷ֎ ଆͷUIʹඃΒͳ͍҆શͳྖҬΛऔಘͰ͖Δ
• iPhoneXͷΑ͏ͳԜΈΛؚΜͩը໘ʹରԠ Ͱ͖Δ
What’s Safe Area API Roadmap • Apple͕iOS11͔Βಋೖͨ֓͠೦ • φϏήʔγϣϯόʔεςʔλεόʔͳͲͷ֎ଆͷ UIʹඃΒͳ͍҆શͳྖҬΛऔಘͰ͖Δ
• iPhoneXͷΑ͏ͳԜΈΛؚΜͩը໘ʹରԠͰ͖Δ • Xcode9+ɺiOS11+ SDKΛ༻͠ɺLaunch images Ͱͳ͘ɺLaunch Screen storyboard͕ඞਢ
What’s Safe Area API Roadmap • ηʔϑΤϦΞΛ༗ޮʹ͢Δ 1. StoryboardΛ։͘ 2.
ӈଆʹ͋ΔInterface BuilderͷΠϯεϖ ΫλΛ։͘ 3. ʮUse Safe Area Layout Guidesʯͷ νΣοΫΛONʹ͢Δ 4. ࣗಈͰηʔϑΤϦΞ(UILayoutGuide) ͕ Ճ͞ΕΔ
Safe Area Preview API Roadmap J1IPOF9 J1IPOF 1PSUSBJU -BOETDBQF എܠ৭͖ͷϥϕϧΛSafeAreaʹදࣔ͢ΔΑ͏ʹ੍ΛՃ࣮ͯ͠ߦͨ͠߹
What’s Safe Area API Roadmap • ͍··ͰͷStoryboardͰηʔϑΤϦΞΛ༗ޮʹ͢Δͱɺ Top Layout GuideBottom
Layout Guideʹଓ͍ͯ͠ ͨϏϡʔࣗಈͰηʔϑΤϦΞͷTopɺBottomʹࠩ͠ସ ͑ͯ͘ΕΔ ηʔϑΤϦΞద༻લ ηʔϑΤϦΞద༻ޙ
ͭ·Γ
ԜΈΛΔ͜ͱͰ
iPhoneXରԠྃʂ
ͱ͍͖·ͤΜ iPhoneXରԠྃʂ
Agenda • What’s iPhoneX • What’s Safe Area • How
To “TRUE” Support iPhoneX • Summary
How To “TRUE” Support iPhoneX API Roadmap • ༨ന෦ͷഎܠʹؾΛ͚ͭΑ͏
API Roadmap Designing for iPhone X - Fall 2017 -
Videos - Apple DeveloperΑΓ ηʔϑΤϦΞͰΓऔΔ͚ͩͷσβΠϯඇਪ
How To “TRUE” Support iPhoneX API Roadmap • ༨ന෦ͷഎܠʹؾΛ͚ͭΑ͏ •
ඞཁͳՕॴͰclipsToBoundsʹͳ͍ͬͯΔ͔ؾ Λ͚ͭΑ͏
API Roadmap ※ը૾։ൃதͷͷͰ͢ɻରԠ൛Ͱى͖·ͤΜͷͰɺ҆͝৺͍ͩ͘͞ɻ clipsToBoundsΛ໌֬ʹࢦఆ͓͔ͯ͠ͳ͍ͱɺ ηʔϑΤϦΞ͕શવηʔϑʹͳΒͳ͘ͳΔ ແ೦ʹΈग़ͯ͠͠·ͬͨ…
How To “TRUE” Support iPhoneX • ༨ന෦ͷഎܠʹؾΛ͚ͭΑ͏ • ඞཁͳՕॴͰclipsToBoundsʹͳ͍ͬͯΔ͔ؾ Λ͚ͭΑ͏
• ίʔυϕʔεͷϏϡʔʹؾΛ͚ͭΑ͏
• ίʔυϕʔεͰViewControllerͷViewͳͲʹՃ͠ ͍ͯΔViewʹࣗಈͰηʔϑΤϦΞద༻͞Εͳ͍ • iOS11͔ΒUIViewͷϓϩύςΟʹsafeAreaInsets (UIEdgeInsets) ͕Ճ͞Ε͍ͯͯɺ͔ͦ͜Βηʔϑ ΤϦΞͷϚʔδϯΛऔಘͰ͖Δ • iOS11+͔͑͠ͳ͍ϓϩύςΟͷͨΊɺ
#available(iOS 11, *) Ͱͷذ͕ඞཁ How To Get Safe Area
How To Get Safe Area import UIKit class ViewController: UIViewController
{ // ͜͜ͰsafeAreaInsets͕ॳΊͯ֬ఆ͢Δ override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() // iOS11͔Ͳ͏͔Ͱذ͢Δ let safeAreaInsets: UIEdgeInsets if #available(iOS 11, *) { safeAreaInsets = view.safeAreaInsets } else { safeAreaInsets = .zero } print("safeAreaInsets: \(safeAreaInsets)") } } UIViewController.swift UIViewControllerͷview͔ΒsafeAreaInsetsΛऔಘ͢Δ
How To “TRUE” Support iPhoneX API Roadmap • ༨ന෦ͷഎܠʹؾΛ͚ͭΑ͏ •
ඞཁͳՕॴͰclipsToBoundsʹͳ͍ͬͯΔ͔ؾ Λ͚ͭΑ͏ • ίʔυϕʔεͷϏϡʔʹؾΛ͚ͭΑ͏ • ϑϧεΫϦʔϯදࣔͰͷΞεϖΫτൺकΖ͏
Designing for iPhone X - Fall 2017 - Videos -
Apple DeveloperΑΓ ίϯςϯπΛϑϧεΫϦʔϯදࣔ͢ΔࡍʹΞεϖΫτൺΛอͪ·͠ΐ͏ iPhone8 (16:9) Λج४ʹ͢Δ߹ ࠨӈΛΓऔͬͯදࣔ ্ԼΛΓऔͬͯදࣔ or
͔͠͠ɺ͜͜Ͱ͕
Safe Area Preview API Roadmap J1IPOF9 J1IPOF 1PSUSBJU -BOETDBQF എܠ৭͖ͷϥϕϧΛSafeAreaʹදࣔ͢ΔΑ͏ʹ੍ΛՃ࣮ͯ͠ߦͨ͠߹
Safe Area Preview API Roadmap J1IPOF9 J1IPOF 1PSUSBJU -BOETDBQF എܠ৭͖ͷϥϕϧΛSafeAreaʹදࣔ͢ΔΑ͏ʹ੍ΛՃ࣮ͯ͠ߦͨ͠߹
Safe Area Preview API Roadmap J1IPOF9 J1IPOF 1PSUSBJU -BOETDBQF എܠ৭͖ͷϥϕϧΛSafeAreaʹදࣔ͢ΔΑ͏ʹ੍ΛՃ࣮ͯ͠ߦͨ͠߹
ఈ͕ΕͪΌͬͯΔΜͰ͚͢Ͳ…
How To Support Fullscreen API Roadmap • Bottomͷ੍Λ࣍ͷΑ͏ʹมߋ͠·͠ΐ͏ Portraitͷͱ͖
How To Support Fullscreen API Roadmap • Bottomͷ੍Λ࣍ͷΑ͏ʹมߋ͠·͠ΐ͏ Portraitͷͱ͖
How To Support Fullscreen API Roadmap • Bottomͷ੍Λ࣍ͷΑ͏ʹมߋ͠·͠ΐ͏ Landscapeͷͱ͖
How To Support Fullscreen API Roadmap • Bottomͷ੍Λ࣍ͷΑ͏ʹมߋ͠·͠ΐ͏ Landscapeͷͱ͖
How To Support Fullscreen ͜ΕͰແࣄʹϑϧεΫϦʔϯදࣔྃʂ
How To Support Fullscreen ͜ΕͰແࣄʹϑϧεΫϦʔϯදࣔྃʂ
How To Support Fullscreen Home Indicator ͕अຐͳΜͰ͚͢Ͳ…
How To Support Fullscreen • Home Indicator ඇදࣔʹͰ͖Δ ‣ iOS11͔ΒUIViewControllerͷΦʔόʔϥΠυϝιο
υͱͯ͠ɺ༻ҙ͞Ε͍ͯΔ import UIKit class ViewController: UIViewController { private var isHiddenHomeIndicator: Bool = true override func viewDidLoad() { super.viewDidLoad() // HomeIndicatorͷදࣔΛߋ৽͢ΔͨΊͷϝιου if #available(iOS 11, *) { setNeedsUpdateOfHomeIndicatorAutoHidden() } } @available(iOS 11, *) override func prefersHomeIndicatorAutoHidden() -> Bool { return isHiddenHomeIndicator } } UIViewController.swift
How To Support Fullscreen ͜ΕͰຊʹϑϧεΫϦʔϯදࣔྃʂ!
How To “TRUE” Support iPhoneX API Roadmap • ༨ന෦ͷഎܠʹؾΛ͚ͭΑ͏ •
ඞཁͳՕॴͰclipsToBoundsʹͳ͍ͬͯΔ͔ؾ Λ͚ͭΑ͏ • ίʔυϕʔεͷϏϡʔʹؾΛ͚ͭΑ͏ • ϑϧεΫϦʔϯදࣔͰͷΞεϖΫτൺकΖ͏ etc.
Agenda • What’s iPhoneX • What’s Safe Area • How
To “TRUE” Support iPhoneX • Summary
Summary • iPhoneXʹରԠ͢ΔʹηʔϑΤϦΞͷ֓೦͕ ॏཁʹͳΔ • ηʔϑΤϦΞͰ݁͢Δ͚ͩͰiPhoneXର ԠʹͳΒͳ͍ • ԜΈΛΔ͚ͩͰͳ͘ɺԜΈΛͬͯɺԜΈ Λ׆͔࣮͕ͨ͠ඞཁ
Thank youʂ
ࢀߟϦϯΫ • Designing for iPhone X - Fall 2017 -
Videos - Apple Developer https://developer.apple.com/videos/play/fall2017/801/ • iPhone X - Overview - iOS Human Interface Guidelines https://developer.apple.com/ios/human-interface-guidelines/ overview/iphone-x/ • iPhone XͷηʔϑΤϦΞϚʔδϯ෯ʹ͍ͭͯ - Qiita https://qiita.com/usagimaru/items/761e9a5f3d78b1939df8 • ʲiOS11ʳsafeAreaInsetsͷ͕औಘͰ͖ΔλΠϛϯά https://qiita.com/hituziando/items/e5873b5bfa42247071e6