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
iPhone X対応 ~Safe Areaの外側~
Search
akatsuki174
December 10, 2017
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iPhone X対応 ~Safe Areaの外側~
2017/12/11 2017年 AKIBA.swift忘年回
akatsuki174
December 10, 2017
More Decks by akatsuki174
See All by akatsuki174
逆向きUIの世界 〜iOSアプリのRTL言語対応〜
akatsuki174
1
730
逆向きUIの世界〜AndroidアプリのRTL言語対応〜
akatsuki174
1
1.2k
私が変えてきたこと、変えなかったこと
akatsuki174
2
1.1k
最近読んでいる本-読書シェア会vol.1
akatsuki174
2
300
SwiftUI、UIKitでキャプチャを撮ろう!
akatsuki174
1
160
Appleにおけるプライバシーの全容を把握する
akatsuki174
0
6.4k
近年のAppleにおける位置情報とプライバシー
akatsuki174
3
540
オフライン勉強会ぼっち対策
akatsuki174
1
750
Xcode 15の新機能
akatsuki174
0
2.9k
Other Decks in Programming
See All in Programming
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
すこし踏み込む CancellationToken
htkym
2
1.7k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
510
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Are puppies a ranking factor?
jonoalderson
2
4.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
A better future with KSS
kneath
240
18k
Ethics towards AI in product and experience design
skipperchong
2
430
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Product Roadmaps are Hard
iamctodd
55
13k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Transcript
iPhone XରԠ ~Safe Areaͷ֎ଆ~ @akatsuki174
ࣗݾհ • ਢ౻ຘ • iOSΤϯδχΞ • Twitter, Qiita, SlideShare, Github,
SpeakerDeck →akatsuki174
1݄ޙʹvol.5 ։࠵༧ఆʂ
Έͳ͞ΜiPhone XରԠɺ ͪΖΜऴΘͬͯ·͢ΑͶʁ
ରԠγςϧ ରԠγςφΠ ѹత େը໘ ্Լʹ ࠇͯ͘ ͑ͳ͍ ෦͕ͬ
ɾͪΐͬͱ೦ͳؾ࣋ͪʹͳΔ ɾී௨ʹͪΐͬͱ͍ͮΒ͍ ɾ͜ͷձࣾɺiOSΞϓϦ։ൃʹྗೖΕͯͳ͍ ɹͷ͔ͳ…ͱࢥͬͯ͠·͏ ରԠͯ͠ͳ͍ΞϓϦͩͱ…
ͱ͍͏͜ͱͰ iPhone XରԠ͖͢ʂ
ͰඍົʹΫη͕͋Δ
iPhone XରԠΛ͢Δ্Ͱ͔ܽͤͳ͍ Safe AreaपΓͰ͍᪴ͨϙΠϯτͱ ͦͷղܾࡦʹ͍ͭͯ͠·͢ɻ ຊͷ
ɾGitHub https://github.com/akatsuki174/ OutsideSafeAreaLayout ɾQiita ޙiOSΞυϕϯτΧϨϯμʔʹͯެ։ ؔ࿈ࢿྉ
ɾWWDC2017Ͱొ ɾiOS11, Xcode9͔Β༻Մೳ ɾtopٴͼbottom layout guideͷ ɹdeprecatedԽͱೖΕସΘΓ ͓͞Β͍ɿSafe Areaͱ
͓͞Β͍ɿSafe Areaͱ https://developer.apple.com/documentation/uikit/uiview/ positioning_content_relative_to_the_safe_area
ࠓճ࣮ݱ͔ͨͬͨ͜͠ͱ ɾը໘Լ෦ʹ্ԼΞχϝʔγϣϯ ɹ͢ΔviewηοτΛஔ͘ ɾviewηοτͷपลͷܠ؍Λ ɹཚ͞ͳ͍ ※ҎԼɺΞχϝʔγϣϯ͢Δviewͷ ηοτͷ͜ͱΛMenuViewͱݺͼ·͢
͖᪴ϙΠϯτ̍ MenuView͕ Home IndicatorͱඃΔ
None
ͲΜͳ࣮ʹͳ͍͔ͬͯͨ Safe Areaͷbottomʹରͯ͠Ͱͳ͘ SuperviewʢViewController.viewʣͷ bottomʹର੍ͯ͠Λ͚͍ͯͨ
Ͳ͏࣮Λม͔͑ͨ Safe Area͕͑ΔΜͳΒͦͷbottomΛ औ੍ͬͯΛ͚Δɻ ͑ͳ͍ͳΒࠓ·Ͱ௨Γ
͖᪴ϙΠϯτ̎ viewͷԼʹtable viewͷ༰͕ νϥݟ͑͢Δ
εΫϩʔϧ͢Δͱ৺ͳ͔͠ ͕νΧνΧ͢Δ
ͲΜͳ࣮ʹͳ͍͔ͬͯͨ SafeAreaͷbottomʹରͯ͠Ͱͳ͘Superview ʢViewControllerͷviewʣͷbottomʹରͯ͠ ੍Λ͔͚͍ͯͨ
Ͳ͏࣮Λม͔͑ͨ Safe Areaͷbottomʹର੍ͯ͠Λ ͚ΔΑ͏ʹͨ͠
݁Ռ ViewControllerͷviewͷ എܠ৭͕MenuViewͷԼʹ ݟ͑ΔΑ͏ʹͳͬͨɻ
͖᪴ϙΠϯτ̏ MenuViewΛϑϧͰ දࣔ͠ͳ͍࣌ʹ͔ͬ͜ѱ͍
ԫ৭͍෦ʹίϯςϯπ͕ දࣔ͞Ε͍ͯΔͱࢥͬͯ Լ͍͞… ඍົ͡Όͳ͍Ͱ͔͢ʁ
Ͳ͏࣮Λม͔͑ͨ ʮˢˣʯϘλϯ͕λοϓ͞Εͨ࣌ʹ Ξχϝʔγϣϯͭͭ͠alphaΛมߋ
͜ΕͰ
͓·͚
ɾಈతͳ੍Λ͔͚͍ͯΔηϧͷ ɹϨΠΞτ͕Safe AreaͷڥքۙͰ ɹ͏ʹΐ͏ʹΐಈ͘ ɾiPhone XҎ֎Կͳ͘ಈ͘ ɹʢͦΕΏ͑ؾͮ͘ͷΕͨʣ ͜Μͳঢ়͕ग़ͨ͜ͱ
֘ͷcell.xibͷviewΛ બ͠ɺSafe Area Layout Guideͷ νΣοΫϘοΫεΛ ֎͢͜ͱͰղܾͨ͠ ղܾࡦ
ɾϨΠΞτʹؔΘΔ࣮Λͨ࣌͠ ɹඞͣiPhone XͰ֬ೝ͢Δ ɾͳΜ͔͓͔͍͠ͱࢥͬͨΒSafe Area ɹLayout GuideͷνΣοΫϘοΫεΛ ɹ֎ͯ͠ΈΔ ɾSafe Areaͷ֎ଆ͕ͲͷΑ͏ͳදࣔʹ
ɹͳ͍ͬͯΔ͖͔ߟ͑Δ iPhone XରԠͷίπ
͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ