Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Playing Sheet presentation style on iOS 13
Shin Yamamoto
July 24, 2019
Programming
0
300
Playing Sheet presentation style on iOS 13
Shin Yamamoto
July 24, 2019
Tweet
Share
More Decks by Shin Yamamoto
See All by Shin Yamamoto
scenee
0
180
scenee
1
720
scenee
4
1.1k
scenee
0
410
scenee
0
2.5k
Other Decks in Programming
See All in Programming
manfredsteyer
PRO
0
110
larsrh
0
110
lovee
9
2.8k
line_developers_tw2
0
4.3k
legalforce
PRO
1
700
rarous
0
170
madai0517
1
190
numeroanddev
1
230
emmaglorypraise
0
130
sters
2
130
boriswilhelms
0
120
christianliebel
PRO
0
140
Featured
See All Featured
lynnandtonic
272
16k
aarron
257
36k
skipperchong
8
710
trishagee
24
2.5k
roundedbygravity
242
21k
wjessup
339
16k
akmur
252
19k
scottboms
251
11k
ufuk
56
5.4k
kneath
294
39k
dotmariusz
94
5.5k
cassininazir
347
20k
Transcript
Playing Sheet presentation style on iOS 13 Potatotips #63 19/7/24
@SmartNews Shin Yamamoto @scenee
• iOS Developer • Freelancer • Creator of FloatingPanel Hi,
I’m @scenee! https://github.com/SCENEE/FloatingPanel
What’s Sheet presentation style?
Sheet presentation style • New presentation style from iOS 13
• Mail.app • .pageSheet,.formSheet • Default style in iOS 13 (SDK) ◦ .automatic ≒.pageSheet
Sheet Fullscreen Content Non immersive 非没入型 Immersive 没入型 Dismiss •
Tapping a button • Swiping down (optional) Tapping a button Modality: Sheet and Fullscreen https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/modality/
Migration notes • Add a button to dismiss • Care
the swipe-to-dismiss action • View Controller life cycle
Presenting View Controller Life Cycle Sheet Fullscreen viewWillAppear -- Invoked
viewDidAppear -- Invoked viewWillDisappear -- Invoked viewDidDisappear -- Invoked
Presented View Controller Life Cycle Sheet Fullscreen viewWillAppear Invoked Invoked
viewDidAppear Invoked Invoked viewWillDisappear Multiple invoked Invoked viewDidDisappear Invoked Invoked
WWDC19 Sessions • What’s New in iOS Design https://developer.apple.com/videos/play/wwdc2019/808 •
Modernizing Your UI for iOS 13 https://developer.apple.com/videos/play/wwdc2019/224
Sheet presentation features • Swipe to dismiss • Sheet bounce
• Scroll integration
Sheet features • Swipe to dismiss (customizable) • Sheet bounce
• Scroll integration
• Disable to dismiss ◦ Set .isModalnPresentation to true ◦
UIAdaptivePresentationControllerDelegate ▪ Return false in presentationControllerShouldDismiss Swipe to dismiss
• Detect a dismiss action ◦ UIAdaptivePresentationControllerDelegate ▪ presentationControllerDidAttempToDismiss ▪
presentationControllerWillDismiss ▪ presentationControllerDidDismiss Swipe to dismiss
I wonder how to add Mail.app-like UI to suspend and
resume a task
Demo
How to implement • Dismiss buttons in NavigationBar on swiping
up
How to implement • Stop dropping a modal view at
a position Y.
How to implement • Change state of the presenting view
controller
None
None
Recap • Sheet presentation style as default in iOS 13
• A few APIs to customize the behavior • Imitate a task suspending UI using presentedView
Thanks you!