Multitasking

Michele Titolo
Michele TitoloComputers ¯\_(ツ)_/¯ at Square
Multitasking
The Hard Way
@micheletitolo

Lead Software Engineer, Capital One
What We’ll Cover
What are Multitasking and Adaptivity?

Creating Adaptivity

Tips, Tricks, and Gotchas
What Is Multitasking?
Multitasking
Adaptivity
Multitasking
Multitasking
Compact
Compact
Regular
Regular
✔
✔✔
x
Creating Adaptivity
• Launch.storyboard

• Full iPad rotation

• UITraitCollection
Mechanics
Apps Must Use A
Launch.Storyboard
Apps Must Allow
Full Rotation
Setting in Info.plist
UITraitCollection
horizontalSizeClass

verticalSizeClass
UITraitEnvironment

UIContentContainer
UITraitEnvironment
traitCollection
traitCollectionDidChange
UIView
UIViewController
UIPresentationController
UIContentContainer
viewWillTransitionToSize
willTransitionToTraitCollection
UIViewController
UIPresentationController
Different Use Cases
Responding To Changes
Multitasking Order
Multitasking
•applicationWillResignActive
•willTransitionToTraitCollection
•viewWillTransitionToSize
•traitCollectionDidChange
•applicationDidBecomeActive
Multitasking Order
Multitasking
•applicationWillResignActive
•willTransitionToTraitCollection
•viewWillTransitionToSize
•traitCollectionDidChange
•applicationDidBecomeActive
Multitasking Order
Multitasking
•applicationWillResignActive
•willTransitionToTraitCollection
•viewWillTransitionToSize
•traitCollectionDidChange
•applicationDidBecomeActive
Multitasking Order
Slideovers Are Still Inactive
Multitasking
Becoming Adaptive
Tools
Installed Views

Installed Constraints

Conditional Constraint Constants
Demo
Multitasking
Multitasking
Multitasking
Multitasking
Multitasking
Only Constraint Constants
Can Change
Tips, Tricks,
Gotchas
Autolayout
Multitasking
Rotation APIs
Multitasking
Multitasking
UISplitViewController
Compact == Modal
Still Can’t Be Pushed
Can Be Embedded
Multitasking
UIPopoverPresentationController
Also Fullscreen In Compact
UIPresentationController
Set modalPresentationStyle
To .Custom
adaptivePresentationStyleFor

TraitCollection:
UICollectionView
Don’t rely on
shouldInvalidateLayoutForBoundsChange
prepareLayout()
may have incorrect traits
use both
willTransitionToTraitCollection,
viewWillTransitionToSize
Multitasking
Multitasking
Bugs!
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
iPad iPhone 6/6+ iPad Pro
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
iPad iPhone 6/6+ iPad Pro
UIViewController
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
iPad iPhone 6/6+ iPad Pro
UIViewController
UIPopoverController
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
iPad iPhone 6/6+ iPad Pro
UIViewController
UIPopoverController
UIViewController Containment
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
Autolayout
iPad iPhone 6/6+ iPad Pro
UICollectionView
UIViewController
UIPopoverController
UIViewController Containment
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
Autolayout
iPad iPhone 6/6+ iPad Pro
UICollectionView
UIViewController
UIPopoverController UITraitCollection
UITraitEnvironment
UIViewController Containment
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
Autolayout
iPad iPhone 6/6+ iPad Pro
UICollectionView
UIViewController
UIPopoverController
UIContentContainer
UITraitCollection
UITraitEnvironment
UIViewController Containment
iOS 5 iOS 7
iPhone 2 NowiPhone 3.2 iOS 6
iPhone 5
iOS 9iOS 8
UISplitViewController
Autolayout
iPad iPhone 6/6+ iPad Pro
Multitasking
UICollectionView
UIViewController
UIPopoverController
UIStackView
UIContentContainer
UITraitCollection
UITraitEnvironment
UIViewController Containment
iOS 5 iOS 7
UITraitCollection Support
Has Been Added To
Older Components
Storyboards and Xibs
Frames Change When
Size Class Changes
Multitasking
Multitasking
First Time In A New Size Class
Adds Info To File
Misplaced Views In
Different Size Classes
Installed Views And Constraints Only
Work From Storyboards And Xibs
Conditional Constraint Constants Only
Work From Storyboards And Xibs
Any x Any
Constraints Must Be Set
For Any x Any
Even though no devices have that 

size class configuration
Multitasking
Pick A Size Class To Use
For Any x Any
Interface Builder Warnings
UI Will Look Weird
Use Constraint Priorities
Questions?
https://github.com/mtitolo/space

https://github.com/mtitolo/primaries
Photo Credits
• https://unsplash.com/photos/iiaXf9xmgbM

• https://unsplash.com/photos/85hdWh8KtR4

• https://unsplash.com/photos/l5Tzv1alcps
1 of 87

Recommended

PhotoFlipCardView by
PhotoFlipCardViewPhotoFlipCardView
PhotoFlipCardViewKatsumi Kishikawa
843 views21 slides
Introduction to State Restoration in Flutter by
Introduction to State Restoration in FlutterIntroduction to State Restoration in Flutter
Introduction to State Restoration in FlutterDave Chao
89 views19 slides
Apple spire by
Apple spireApple spire
Apple spireBangalore Real
288 views14 slides
What we know: Google's 21st April mobile algorithm update by
What we know: Google's 21st April mobile algorithm updateWhat we know: Google's 21st April mobile algorithm update
What we know: Google's 21st April mobile algorithm updateSelesti
5.5K views15 slides
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night by
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_nightリリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_nightKenji Tanaka
1.2K views16 slides
Intro of Wandoujia Apps Search by
Intro of Wandoujia Apps SearchIntro of Wandoujia Apps Search
Intro of Wandoujia Apps Searchjunyu
566 views21 slides

More Related Content

Viewers also liked

Multitasking by
MultitaskingMultitasking
Multitaskingiampencilbox
19.6K views12 slides
Multitasking presentation by
Multitasking presentationMultitasking presentation
Multitasking presentationjunjunjnd
7K views12 slides
Multi tasking ppt by
Multi tasking pptMulti tasking ppt
Multi tasking pptDaria Frauenfelder
7.3K views8 slides
Multitasking by
MultitaskingMultitasking
Multitaskingnitikasethi
6.1K views13 slides
Multitasking task engagement by
Multitasking task engagementMultitasking task engagement
Multitasking task engagementalex_xzy
823 views11 slides
Operating system; Multitasking by
Operating system; MultitaskingOperating system; Multitasking
Operating system; MultitaskingFlameDimension95
6.2K views12 slides

Viewers also liked(20)

Multitasking presentation by junjunjnd
Multitasking presentationMultitasking presentation
Multitasking presentation
junjunjnd7K views
Multitasking task engagement by alex_xzy
Multitasking task engagementMultitasking task engagement
Multitasking task engagement
alex_xzy823 views
Multitasking: How brain works on different tasks by Mujahid Hussain
Multitasking: How brain works on different tasksMultitasking: How brain works on different tasks
Multitasking: How brain works on different tasks
Mujahid Hussain625 views
Operating System by aziz_miu
Operating SystemOperating System
Operating System
aziz_miu2.4K views
Mobile and Tablet TV Multitasking - Razorfish and Yahoo! by Jeremy Lockhorn
Mobile and Tablet TV Multitasking - Razorfish and Yahoo!Mobile and Tablet TV Multitasking - Razorfish and Yahoo!
Mobile and Tablet TV Multitasking - Razorfish and Yahoo!
Jeremy Lockhorn3.2K views
Work force-optimization-through-multi-skilled-workers by hosam elkhateb
Work force-optimization-through-multi-skilled-workersWork force-optimization-through-multi-skilled-workers
Work force-optimization-through-multi-skilled-workers
hosam elkhateb2.5K views
REAL TIME OPERATING SYSTEM by prakrutijsh
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
prakrutijsh24.9K views
Multitasking: Maximum Effectiveness, Minimum Errors. by Rommie Duckworth
Multitasking: Maximum Effectiveness, Minimum Errors.Multitasking: Maximum Effectiveness, Minimum Errors.
Multitasking: Maximum Effectiveness, Minimum Errors.
Rommie Duckworth4K views
Real Time OS For Embedded Systems by Himanshu Ghetia
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
Himanshu Ghetia45.5K views
Unit 4 Real Time Operating System by Dr. Pankaj Zope
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
Dr. Pankaj Zope21.4K views

Similar to Multitasking

There is no spoon - iPhone vs. iPad by
There is no spoon - iPhone vs. iPadThere is no spoon - iPhone vs. iPad
There is no spoon - iPhone vs. iPadPaul Ardeleanu
942 views38 slides
Titanium appcelerator sdk by
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdkAlessio Ricco
1.9K views33 slides
iOS 8時代のUISplitViewController by
iOS 8時代のUISplitViewControlleriOS 8時代のUISplitViewController
iOS 8時代のUISplitViewControllercocominap
2.1K views33 slides
Compose In Practice by
Compose In PracticeCompose In Practice
Compose In PracticeKelvin Harron
30 views91 slides
iOS humaninterfaceguidelines by
iOS humaninterfaceguidelinesiOS humaninterfaceguidelines
iOS humaninterfaceguidelinescdsg
1.3K views203 slides
Iphone app programming guide by
Iphone app programming guideIphone app programming guide
Iphone app programming guideClickBank
771 views119 slides

Similar to Multitasking(20)

There is no spoon - iPhone vs. iPad by Paul Ardeleanu
There is no spoon - iPhone vs. iPadThere is no spoon - iPhone vs. iPad
There is no spoon - iPhone vs. iPad
Paul Ardeleanu942 views
Titanium appcelerator sdk by Alessio Ricco
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
Alessio Ricco1.9K views
iOS 8時代のUISplitViewController by cocominap
iOS 8時代のUISplitViewControlleriOS 8時代のUISplitViewController
iOS 8時代のUISplitViewController
cocominap2.1K views
iOS humaninterfaceguidelines by cdsg
iOS humaninterfaceguidelinesiOS humaninterfaceguidelines
iOS humaninterfaceguidelines
cdsg1.3K views
Iphone app programming guide by ClickBank
Iphone app programming guideIphone app programming guide
Iphone app programming guide
ClickBank771 views
Android Wear: A Developer's Perspective by Vin Lim
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
Vin Lim459 views
Unos minutos con WatchKit - iCon by iCon
Unos minutos con WatchKit - iConUnos minutos con WatchKit - iCon
Unos minutos con WatchKit - iCon
iCon863 views
Everything You Need to Know About Testing Foldable Phones by Perfecto by Perforce
Everything You Need to Know About Testing Foldable PhonesEverything You Need to Know About Testing Foldable Phones
Everything You Need to Know About Testing Foldable Phones
Google Developer Group(GDG) DevFest Event 2012 Android talk by Imam Raza
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza1.4K views
打造你的第一個iPhone APP by 彼得潘 Pan
打造你的第一個iPhone APP打造你的第一個iPhone APP
打造你的第一個iPhone APP
彼得潘 Pan2.3K views
Win8 development lessons learned jayway by Andreas Hammar
Win8 development lessons learned jaywayWin8 development lessons learned jayway
Win8 development lessons learned jayway
Andreas Hammar656 views
Android wear and Cardboard by mharkus
Android wear and CardboardAndroid wear and Cardboard
Android wear and Cardboard
mharkus2K views
Fragments: Why, How, What For? by Brenda Cook
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?
Brenda Cook1.3K views
An end-to-end experience of Windows Phone 7 development (Part 1) by rudigrobler
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
rudigrobler764 views

More from Michele Titolo

Writing Design Docs for Wide Audiences by
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide AudiencesMichele Titolo
94 views43 slides
Beam Me Up: Voyaging into Big Data by
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big DataMichele Titolo
383 views90 slides
APIs: The Good, The Bad, The Ugly by
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The UglyMichele Titolo
155 views98 slides
Tackling the Big, Impossible Project by
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible ProjectMichele Titolo
534 views39 slides
No Microservice is an Island by
No Microservice is an IslandNo Microservice is an Island
No Microservice is an IslandMichele Titolo
611 views183 slides
From iOS to Distributed Systems by
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed SystemsMichele Titolo
944 views101 slides

More from Michele Titolo(20)

Writing Design Docs for Wide Audiences by Michele Titolo
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide Audiences
Michele Titolo94 views
Beam Me Up: Voyaging into Big Data by Michele Titolo
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big Data
Michele Titolo383 views
APIs: The Good, The Bad, The Ugly by Michele Titolo
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The Ugly
Michele Titolo155 views
Tackling the Big, Impossible Project by Michele Titolo
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible Project
Michele Titolo534 views
No Microservice is an Island by Michele Titolo
No Microservice is an IslandNo Microservice is an Island
No Microservice is an Island
Michele Titolo611 views
From iOS to Distributed Systems by Michele Titolo
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed Systems
Michele Titolo944 views
More than po: Debugging in LLDB by Michele Titolo
More than po: Debugging in LLDBMore than po: Debugging in LLDB
More than po: Debugging in LLDB
Michele Titolo2.6K views
Swift Generics in Theory and Practice by Michele Titolo
Swift Generics in Theory and PracticeSwift Generics in Theory and Practice
Swift Generics in Theory and Practice
Michele Titolo1.8K views
Making friendly-microservices by Michele Titolo
Making friendly-microservicesMaking friendly-microservices
Making friendly-microservices
Michele Titolo1.1K views
More Than po: Debugging in LLDB @ CocoaConf SJ 2015 by Michele Titolo
More Than po: Debugging in LLDB @ CocoaConf SJ 2015More Than po: Debugging in LLDB @ CocoaConf SJ 2015
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
Michele Titolo761 views
More than `po`: Debugging in lldb by Michele Titolo
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
Michele Titolo9.1K views
Cocoa Design Patterns in Swift by Michele Titolo
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
Michele Titolo9.1K views
Mastering the Project File (AltConf) by Michele Titolo
Mastering the Project File (AltConf)Mastering the Project File (AltConf)
Mastering the Project File (AltConf)
Michele Titolo1.8K views

Recently uploaded

Top-5-production-devconMunich-2023-v2.pptx by
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTier1 app
8 views42 slides
Benefits in Software Development by
Benefits in Software DevelopmentBenefits in Software Development
Benefits in Software DevelopmentJohn Valentino
5 views15 slides
Using Qt under LGPL-3.0 by
Using Qt under LGPL-3.0Using Qt under LGPL-3.0
Using Qt under LGPL-3.0Burkhard Stubert
13 views11 slides
Electronic AWB - Electronic Air Waybill by
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill Freightoscope
5 views1 slide
Bootstrapping vs Venture Capital.pptx by
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptxZeljko Svedic
15 views17 slides
What is API by
What is APIWhat is API
What is APIartembondar5
13 views15 slides

Recently uploaded(20)

Top-5-production-devconMunich-2023-v2.pptx by Tier1 app
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app8 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 5 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic15 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers42 views
Transport Management System - Shipment & Container Tracking by Freightoscope
Transport Management System - Shipment & Container TrackingTransport Management System - Shipment & Container Tracking
Transport Management System - Shipment & Container Tracking
Freightoscope 5 views
Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app9 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi216 views
ADDO_2022_CICID_Tom_Halpin.pdf by TomHalpin9
ADDO_2022_CICID_Tom_Halpin.pdfADDO_2022_CICID_Tom_Halpin.pdf
ADDO_2022_CICID_Tom_Halpin.pdf
TomHalpin95 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views
aATP - New Correlation Confirmation Feature.pptx by EsatEsenek1
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptx
EsatEsenek1205 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app8 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8714 views

Multitasking