Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+...

130
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Part 1 App Frameworks #WWDC16 Session 222 Making Apps Adaptive Kevin Cathey Interface Builder Engineer Brent Shank Interface Builder Engineer

Transcript of Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+...

Page 1: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Part 1

App Frameworks #WWDC16

Session 222

Making Apps Adaptive

Kevin Cathey Interface Builder EngineerBrent Shank Interface Builder Engineer

Page 2: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

TakeawayThe system is going to do most of the work so you don’t have to.

Page 3: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

1,000,000,000

Page 4: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE
Page 5: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE
Page 6: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

A

Page 7: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

A

Page 8: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

A

Page 9: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Dynamic Type

Page 10: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Dynamic Type

Dynamic Type

Layout Direction

Page 11: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Dynamic Type

Dynamic Type

Layout Direction

Page 12: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Dynamic Type

Dynamic Type

Layout Direction

Display Gamut

Interface Style

Page 13: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Dynamic Type

Dynamic Type

Layout Direction

Display Gamut

Interface Style

Page 14: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Combinations

300+

Page 15: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

TakeawayThe system is going to do most of the work so you don’t have to.

most

Page 16: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

TakeawayThe system is going to do most of the work so you don’t have to.

most

Page 17: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

Page 18: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

Page 19: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1

Aa

Page 20: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1 PART 2

Aa

Page 21: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1 PART 2

{}Aa

Page 22: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1 PART 2

{}Aa

Page 23: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1

Aa

Page 24: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PART 1

Aa

Page 25: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

Page 26: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

What traits are

Aa

Page 27: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

What traits are

Size classes

Aa

Page 28: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

What traits are

Size classes

How traits work

Aa

Page 29: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Traits

Page 30: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

horizontalSizeClass[

Page 31: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

[horizontalSizeClass = Compact][

Page 32: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

[horizontalSizeClass = Compact,

verticalSizeClass = Regular,

displayGamut = P3]

Page 33: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

Page 34: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

Size Classes

Page 35: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

Size Classes Dynamic Type

TT

Page 36: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

Size Classes Dynamic Type

TTLayout Direction

Page 37: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT Size Classes Dynamic Type

TTLayout Direction

Page 38: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE

Size Classes Dynamic Type

TTLayout Direction

Page 39: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE

Size Classes Dynamic Type

TTLayout Direction

Display Gamut

Page 40: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE

Size Classes Dynamic Type

TTLayout Direction

Interface StyleDisplay Gamut

Page 41: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE CAPABILITIES

Size Classes Dynamic Type

TTLayout Direction

Interface StyleDisplay Gamut

Page 42: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE CAPABILITIES

Size Classes Dynamic Type

TTLayout Direction

3D TouchInterface StyleDisplay Gamut

Page 43: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

LAYOUT

APPEARANCE CAPABILITIES

Size Classes Dynamic Type

TTLayout Direction

3D TouchInterface StyleDisplay Gamut

UITraitCollection

Page 44: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Trait Examples

Size Classes

Page 45: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Size Classes

Page 46: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

IPHONE 4S

IPAD PRO 12.9”

IPHONE SE

IPHONE 6S

IPHONE 6S+

IPAD PRO 9.7”

480

576

667

736

1024

1336

320 414375 768 1024 1336

12.9” LANDSCAPE

9.7” LANDSCAPE

6S+ LANDSCAPE

6S LANDSCAPE

SE4S LANDSCAPE

9.7” SLIDE OVERPORTRAIT

9.7” SPLIT VIEW2/3 PORTRAIT

9.7” SPLIT VIEW1/2 LANDSCAPE

9.7” SPLIT VIEW2/3 LANDSCAPE

12.9” SLIDEOVER PORTRAIT

12.9” SPLIT VIEW2/3 PORTRAIT

12.9” SPLIT VIEW1/2 LANDSCAPE

12.9” SPLIT VIEW2/3 LANDSCAPE

Page 47: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

IPHONE 4S

IPAD PRO 12.9”

IPHONE SE

IPHONE 6S

IPHONE 6S+

IPAD PRO 9.7”

480

576

667

736

1024

1336

320 414375 768 1024 1336

12.9” LANDSCAPE

9.7” LANDSCAPE

6S+ LANDSCAPE

6S LANDSCAPE

SE4S LANDSCAPE

9.7” SLIDE OVERPORTRAIT

9.7” SPLIT VIEW2/3 PORTRAIT

9.7” SPLIT VIEW1/2 LANDSCAPE

9.7” SPLIT VIEW2/3 LANDSCAPE

12.9” SLIDEOVER PORTRAIT

12.9” SPLIT VIEW2/3 PORTRAIT

12.9” SPLIT VIEW1/2 LANDSCAPE

12.9” SPLIT VIEW2/3 LANDSCAPEScreen Size

Page 48: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

IPHONE 4S

IPAD PRO 12.9”

IPHONE SE

IPHONE 6S

IPHONE 6S+

IPAD PRO 9.7”

480

576

667

736

1024

1336

320 414375 768 1024 1336

12.9” LANDSCAPE

9.7” LANDSCAPE

6S+ LANDSCAPE

6S LANDSCAPE

SE4S LANDSCAPE

9.7” SLIDE OVERPORTRAIT

9.7” SPLIT VIEW2/3 PORTRAIT

9.7” SPLIT VIEW1/2 LANDSCAPE

9.7” SPLIT VIEW2/3 LANDSCAPE

12.9” SLIDEOVER PORTRAIT

12.9” SPLIT VIEW2/3 PORTRAIT

12.9” SPLIT VIEW1/2 LANDSCAPE

12.9” SPLIT VIEW2/3 LANDSCAPEScreen Size Orientation

Page 49: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

IPHONE 4S

IPAD PRO 12.9”

IPHONE SE

IPHONE 6S

IPHONE 6S+

IPAD PRO 9.7”

480

576

667

736

1024

1336

320 414375 768 1024 1336

12.9” LANDSCAPE

9.7” LANDSCAPE

6S+ LANDSCAPE

6S LANDSCAPE

SE4S LANDSCAPE

9.7” SLIDE OVERPORTRAIT

9.7” SPLIT VIEW2/3 PORTRAIT

9.7” SPLIT VIEW1/2 LANDSCAPE

9.7” SPLIT VIEW2/3 LANDSCAPE

12.9” SLIDEOVER PORTRAIT

12.9” SPLIT VIEW2/3 PORTRAIT

12.9” SPLIT VIEW1/2 LANDSCAPE

12.9” SPLIT VIEW2/3 LANDSCAPEScreen Size Orientation Adaptation

Page 50: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

TakeawayBase layout on available space, not device, orientation, or adaptation

Page 51: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Reacting to Available Space

Page 52: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Reacting to Available Space

Coarse Changes

Page 53: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Reacting to Available Space

Coarse Changes Fine Changes

Page 54: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Reacting to Available Space

Coarse Changes Fine Changes

Page 55: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

“All problems in computer science can be solved by another level of indirection”

David Wheeler

Page 56: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

TakeawaySize classes express experience

Page 57: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE
Page 58: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE
Page 59: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

Page 60: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

Page 61: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

Page 62: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

Compact Regular

Page 63: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

wC hC wR hC

wC hR wR hR

Compact Regular

Compact

Regular

Page 64: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

wC hC wR hC

wR hR

Compact Regular

Compact

Regular

Page 65: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

wC hC wR hC

Compact Regular

Compact

Regular

Page 66: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

wR hC

Compact Regular

Compact

Regular

Page 67: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The Specifics of Size Classes

horizontalSizeClass

verticalSizeClass

Compact Regular

Compact

Regular

Page 68: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Page 69: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations

Page 70: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations• But most commonly just two

Page 71: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations• But most commonly just two• Width is most common

Page 72: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations• But most commonly just two• Width is most common

System decides what combination applies

Page 73: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations• But most commonly just two• Width is most common

System decides what combination applies• Size class can change dynamically

Page 74: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

How Does This Help Me?

Only think about four combinations• But most commonly just two• Width is most common

System decides what combination applies• Size class can change dynamically• If you use size classes, system can do the work for you

Page 75: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

View Controller structureDynamic Size Class Changes

Page 76: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

View Controller structureDynamic Size Class Changes

Page 77: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PresentationsDynamic Size Class Changes

Page 78: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PresentationsDynamic Size Class Changes

Page 79: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

PresentationsDynamic Size Class Changes

Page 80: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Fine Grain Changes

Page 81: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Fine Grain Changes

Use Auto Layout to specify changes within a size class

Page 82: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Fine Grain Changes

Use Auto Layout to specify changes within a size class

Making Apps Adaptive, Part 2 Presidio Friday 9:00AM

Medium grain changes?

Page 83: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

What traits are

Size classes

Aa

Page 84: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

What traits are

Size classes

How traits work

Aa

Page 85: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Page 86: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Screen

Page 87: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Screen

TC

Page 88: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Screen Window

TC

Page 89: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Screen Window View Controller

TC

Page 90: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

UITraitEnvironmentPropagating Changes

Screen Window View Controller View

TC

Page 91: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

• ••-

UITraitEnvironmentPropagating Changes

Screen Window View Controller View

traitCollectionDidChange(:)

TC

Page 92: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

View Controller View

• ••-

UITraitEnvironmentPropagating Changes

Screen Window

traitCollectionDidChange(:)

TC

Page 93: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Traits can change during propagationPropagating Changes

Screen

TC TC

Page 94: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Traits can change during propagationPropagating Changes

Screen Window Split View Controller

TCTC

Page 95: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Traits can change during propagationPropagating Changes

Screen Window Split View Controller

Master View Controller

Detail ViewController

-

TC

TC

Page 96: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

override func traitCollectionDidChange(_ previousTraits: UITraitCollection?) {

super.traitCollectionDidChange(previousTraits)

if previousTraits?.horizontalSizeClass != traitCollection.horizontalSizeClass {

switch traitCollection.horizontalSizeClass {

case .compact:

setupConstraintsForCompactEnvironment()

case .unspecified: fallthrough

case .regular:

setupConstraintsForRegularEnvironment()

}

}

}

Page 97: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

override func traitCollectionDidChange(_ previousTraits: UITraitCollection?) {

super.traitCollectionDidChange(previousTraits)

if previousTraits?.horizontalSizeClass != traitCollection.horizontalSizeClass {

switch traitCollection.horizontalSizeClass {

case .compact:

setupConstraintsForCompactEnvironment()

case .unspecified: fallthrough

case .regular:

setupConstraintsForRegularEnvironment()

}

}

}

Page 98: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

override func traitCollectionDidChange(_ previousTraits: UITraitCollection?) {

super.traitCollectionDidChange(previousTraits)

if previousTraits?.horizontalSizeClass != traitCollection.horizontalSizeClass {

switch traitCollection.horizontalSizeClass {

case .compact:

setupConstraintsForCompactEnvironment()

case .unspecified: fallthrough

case .regular:

setupConstraintsForRegularEnvironment()

}

}

}

Page 99: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

override func traitCollectionDidChange(_ previousTraits: UITraitCollection?) {

super.traitCollectionDidChange(previousTraits)

if previousTraits?.horizontalSizeClass != traitCollection.horizontalSizeClass {

switch traitCollection.horizontalSizeClass {

case .compact:

setupConstraintsForCompactEnvironment()

case .unspecified: fallthrough

case .regular:

setupConstraintsForRegularEnvironment()

}

}

}

Page 100: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

override func traitCollectionDidChange(_ previousTraits: UITraitCollection?) {

super.traitCollectionDidChange(previousTraits)

if previousTraits?.horizontalSizeClass != traitCollection.horizontalSizeClass {

switch traitCollection.horizontalSizeClass {

case .compact:

setupConstraintsForCompactEnvironment()

case .unspecified: fallthrough

case .regular:

setupConstraintsForRegularEnvironment()

}

}

}

Page 101: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Page 102: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironment

Page 103: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironmentOverride and check for specific trait changes

Page 104: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironmentOverride and check for specific trait changesSome systems react to traitCollectionDidChange(:) for you

Page 105: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironmentOverride and check for specific trait changesSome systems react to traitCollectionDidChange(:) for you• Interface Builder

Page 106: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironmentOverride and check for specific trait changesSome systems react to traitCollectionDidChange(:) for you• Interface Builder• Asset catalog

Page 107: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

traitCollectionDidChange(:)

Called for each UITraitEnvironmentOverride and check for specific trait changesSome systems react to traitCollectionDidChange(:) for you• Interface Builder• Asset catalog• UIAppearance

Page 108: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Page 109: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Traits describe environment

Page 110: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Traits describe environment• Layout, appearance, capabilities

Page 111: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Traits describe environment• Layout, appearance, capabilities

Override traitCollectionDidChange: to react to trait changes

Page 112: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Traits describe environment• Layout, appearance, capabilities

Override traitCollectionDidChange: to react to trait changesSize classes describe experience

Page 113: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Takeaways

Traits describe environment• Layout, appearance, capabilities

Override traitCollectionDidChange: to react to trait changesSize classes describe experienceSystem is going to do most of the work for you

Page 114: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Demo

Brent Shank

Page 115: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Building adaptive apps in Interface BuilderRecap

Page 116: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Building adaptive apps in Interface BuilderRecap

Page 117: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Building adaptive apps in Interface BuilderRecap

Page 118: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Building adaptive apps in Interface BuilderRecap

Page 119: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Building adaptive apps in Interface BuilderRecap

Page 120: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Summary

PART 1

Page 121: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Summary

Traits describe environmentOverride traitCollectionDidChange: to react to trait changesSize classes describe experience

PART 1

Aa

Page 122: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Summary

Traits describe environmentOverride traitCollectionDidChange: to react to trait changesSize classes describe experienceInterface Builder lets you customize on size class and preview on specific configurations

PART 1

Aa

Page 123: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

PART 1

Page 124: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

The system is going to do most of the work so you don’t have to.

Aa

PART 1

Page 125: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

PART 1

Page 126: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Aa

PART 1 PART 2

Page 127: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

{}Aa

PART 1 PART 2

Page 128: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Related Sessions

Making Apps Adaptive, Part 2 Presidio Friday 9:00AM

What’s New In Auto Layout Presidio Friday 3:00PM

Page 129: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE

Labs

Interface Builder and Auto Layout Lab Developer ToolsLab B Thursday 3:00PM

Interface Builder and Auto Layout Lab Developer ToolsLab C Friday 9:00AM

Page 130: Apple Developer - Making Apps Adaptive...IPHONE 4S IPAD PRO 12.9” IPHONE SE IPHONE 6S IPHONE 6S+ IPAD PRO 9.7” 480 576 667 736 1024 1336 320 375 414 768 1024 1336 12.9” LANDSCAPE