SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
VIEWS AND LAYOUT ON IOS
AGENDA
Views
Auto Layout
Size Classes
Auto Layout in Code
VIEWS
VIEW HIERARCHY
UIView
Views are placed relative to their

parents
View hierarchy is used to handle touch responses [1]:
lowest view in the hierarchy receives touch
if not handled, event gets passed to superview
recursively
Subview 1
Subview
1I
[1] Apple Docs: Event Delivery Responder Chain
VIEW RENDERING
CALayer
UIViewUIKit
CoreAnimation
Each UIView is backed by

a Core Animation object
UIView is main programming

interface
Animation code is delegated

to CALayer
View can access layer through

layer property
VIEW RENDERING
Views are rendered initially when first added to the view
hierarchy, only re-rendered when necessary
Can trigger manual re-render by calling setNeedsDisplay
UIKit components provide private rendering code, custom UI
components can override drawRect for custom rendering
code [2]
[2] Apple Docs: Implementing your drawing code
VIEW PROPERTIES
frame Frame rectangle in super view’s coordinate system
center Center point in super view’s coordinate system
bounds Frame of the view in its own coordinate system
transform Affine transform that is applied to rotate/scale/
etc. the view, invalidates the frame
VIEW PROPERTIES
Frame: (10, 15, 280, 370)
Bounds: (0, 0, 280, 370)Center (150, 200)
150
200
Origin (10, 15)
Size (280, 370)
AUTO LAYOUT
AUTO LAYOUT
Typically don’t set any view properties (frame, center, etc.)
directly, instead use Auto Layout constraints to define view
positions
Make School has an extensive video tutorial series that
teaches you how to work with Auto Layout
SIZE CLASSES
Default Layout Regular Width, Any Height
SIZE CLASSES
Size classes allow you to target different devices and device
orientations with specific constraints
Once you have selected a size class, constraints

will be added only for that specific size class
SIZE CLASSES
If you modify an existing constraint, it will only be modified for
this specific size class
0 is the value for size class Any x Any
20 is the value for size class Regular x Any
AUTO LAYOUT IN CODE
Most Auto Layout work should be done in Interface Builder,
some dynamic features require Auto Layout in code
AUTO LAYOUT IN CODE
Modify existing constraints by creating an IBOutlet that
references them:
@IBOutlet var heightConstraint: NSLayoutConstraint!
func moreButtonTapped() {
heightConstraint.constant = 300
}
AUTO LAYOUT IN CODE
You can only change the constant property of the
constraint, none of the other properties
AUTO LAYOUT IN CODE
For any other modification you need to deactivate
existing constraints and activate new constraints
newWidthConstraint = NSLayoutConstraint(item: orangeView, attribute: .Height, relatedBy: .Equal,
toItem: view, attribute: .Height, multiplier: 0.7, constant: 0)
heightProportionConstraint.active = false
newWidthConstraint.active = true
Deactivate existing constraint before activating new one

to avoid angry error messages
AUTO LAYOUT IN CODE
Auto Layout API is very verbose
You can use Visual Format Language instead [3]: 

let verticalConstraints =
NSLayoutConstraint.constraintsWithVisualFormat("V:|-200.0-[redView]-100.0-|",
options: NSLayoutFormatOptions(rawValue: 0), metrics: ["targetWidth": 200],
views: ["redView": redView])
[3] Apple Docs: Visual Format Language
AUTO LAYOUT IN CODE
Alternatively you can use third-party libraries, i.e.
Cartography [4]:
constrain(view1) { view1 in
view1.width == 100
view1.height == 100
view1.center == view.superview!.center
}
[4] Carthography on GitHub
MANAGING LAYOUT CYCLES
setNeedsLayout: triggers update of layout constraint prior
to next rendering
layoutIfNeeded: triggers update of layout constraints
immediately
CUSTOMIZING LAYOUT
layoutSubviews: Provides you with a hook to write custom
layout code in case Auto Layout cannot be used
ADDITIONAL RESOURCES
View Programming Guide
Make School Video Series on Auto Layout

Weitere ähnliche Inhalte

Was ist angesagt?

Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 

Was ist angesagt? (20)

Android training day 2
Android training day 2Android training day 2
Android training day 2
 
Hilt Annotations
Hilt AnnotationsHilt Annotations
Hilt Annotations
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
 
Intro to iOS Application Architecture
Intro to iOS Application ArchitectureIntro to iOS Application Architecture
Intro to iOS Application Architecture
 
Android app material design from dev's perspective
Android app material design from dev's perspectiveAndroid app material design from dev's perspective
Android app material design from dev's perspective
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 
Android Lollipop - Webinar vom 11.12.2014
Android Lollipop - Webinar vom 11.12.2014Android Lollipop - Webinar vom 11.12.2014
Android Lollipop - Webinar vom 11.12.2014
 
Android Accessibility - The missing manual
Android Accessibility - The missing manualAndroid Accessibility - The missing manual
Android Accessibility - The missing manual
 
IOS- Designing with ui tool bar in ios
IOS-  Designing with ui tool bar in iosIOS-  Designing with ui tool bar in ios
IOS- Designing with ui tool bar in ios
 
Angular js
Angular jsAngular js
Angular js
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
Design Patterns in iOS
Design Patterns in iOSDesign Patterns in iOS
Design Patterns in iOS
 
Feedback using Angularjs + Typescript at Serenytics
Feedback using Angularjs +  Typescript at SerenyticsFeedback using Angularjs +  Typescript at Serenytics
Feedback using Angularjs + Typescript at Serenytics
 
From mvc to viper
From mvc to viperFrom mvc to viper
From mvc to viper
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
 
Ios development 2
Ios development 2Ios development 2
Ios development 2
 
Autolayout
AutolayoutAutolayout
Autolayout
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
 
Java in mule part 2
Java in mule part 2Java in mule part 2
Java in mule part 2
 

Andere mochten auch

Andere mochten auch (19)

Client Server Security with Flask and iOS
Client Server Security with Flask and iOSClient Server Security with Flask and iOS
Client Server Security with Flask and iOS
 
Building a Backend with Flask
Building a Backend with FlaskBuilding a Backend with Flask
Building a Backend with Flask
 
Layout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection ViewLayout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection View
 
Persistence on iOS
Persistence on iOSPersistence on iOS
Persistence on iOS
 
Make School 2017 - Mastering iOS Development
Make School 2017 - Mastering iOS DevelopmentMake School 2017 - Mastering iOS Development
Make School 2017 - Mastering iOS Development
 
Standard libraries on iOS
Standard libraries on iOSStandard libraries on iOS
Standard libraries on iOS
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
 
Multithreading on iOS
Multithreading on iOSMultithreading on iOS
Multithreading on iOS
 
Advanced Core Data
Advanced Core DataAdvanced Core Data
Advanced Core Data
 
Xcode Project Infrastructure
Xcode Project InfrastructureXcode Project Infrastructure
Xcode Project Infrastructure
 
Client Server Communication on iOS
Client Server Communication on iOSClient Server Communication on iOS
Client Server Communication on iOS
 
Swift Objective-C Interop
Swift Objective-C InteropSwift Objective-C Interop
Swift Objective-C Interop
 
Swift 2 intro
Swift 2 introSwift 2 intro
Swift 2 intro
 
Dependency Management on iOS
Dependency Management on iOSDependency Management on iOS
Dependency Management on iOS
 
Client Server Synchronization iOS
Client Server Synchronization iOSClient Server Synchronization iOS
Client Server Synchronization iOS
 
Localization and Accessibility on iOS
Localization and Accessibility on iOSLocalization and Accessibility on iOS
Localization and Accessibility on iOS
 
Error Handling in Swift
Error Handling in SwiftError Handling in Swift
Error Handling in Swift
 
Memory Management on iOS
Memory Management on iOSMemory Management on iOS
Memory Management on iOS
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 

Ähnlich wie iOS Layout Overview

Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
AbdullahMunir32
 
CSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptxCSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptx
zaidAhmad84
 
Guice tutorial
Guice tutorialGuice tutorial
Guice tutorial
Anh Quân
 

Ähnlich wie iOS Layout Overview (20)

iOS Design to Code - Code
iOS Design to Code - CodeiOS Design to Code - Code
iOS Design to Code - Code
 
The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...
 
Lviv MD Day 2015 Костянтин Бичков "iOS Autolayouts – це добре!"
Lviv MD Day 2015 Костянтин Бичков "iOS Autolayouts – це добре!"Lviv MD Day 2015 Костянтин Бичков "iOS Autolayouts – це добре!"
Lviv MD Day 2015 Костянтин Бичков "iOS Autolayouts – це добре!"
 
Swift
SwiftSwift
Swift
 
Custom components
Custom componentsCustom components
Custom components
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2
 
Objective c design pattens-architetcure
Objective c design pattens-architetcureObjective c design pattens-architetcure
Objective c design pattens-architetcure
 
IOS APPs Revision
IOS APPs RevisionIOS APPs Revision
IOS APPs Revision
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
 
CSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptxCSE-4078 - Lecture - Week 3sasdgaga.pptx
CSE-4078 - Lecture - Week 3sasdgaga.pptx
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
 
Google GIN
Google GINGoogle GIN
Google GIN
 
Guice tutorial
Guice tutorialGuice tutorial
Guice tutorial
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Swift Tableview iOS App Development
Swift Tableview iOS App DevelopmentSwift Tableview iOS App Development
Swift Tableview iOS App Development
 
Ui 5
Ui   5Ui   5
Ui 5
 
How To Build iOS Apps Without interface Builder
How To Build iOS Apps Without interface BuilderHow To Build iOS Apps Without interface Builder
How To Build iOS Apps Without interface Builder
 
Autolayout
AutolayoutAutolayout
Autolayout
 
WMP_MP02_revd(10092023).pptx
WMP_MP02_revd(10092023).pptxWMP_MP02_revd(10092023).pptx
WMP_MP02_revd(10092023).pptx
 

Kürzlich hochgeladen

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Kürzlich hochgeladen (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 

iOS Layout Overview

  • 1.
  • 5. VIEW HIERARCHY UIView Views are placed relative to their
 parents View hierarchy is used to handle touch responses [1]: lowest view in the hierarchy receives touch if not handled, event gets passed to superview recursively Subview 1 Subview 1I [1] Apple Docs: Event Delivery Responder Chain
  • 6. VIEW RENDERING CALayer UIViewUIKit CoreAnimation Each UIView is backed by
 a Core Animation object UIView is main programming
 interface Animation code is delegated
 to CALayer View can access layer through
 layer property
  • 7. VIEW RENDERING Views are rendered initially when first added to the view hierarchy, only re-rendered when necessary Can trigger manual re-render by calling setNeedsDisplay UIKit components provide private rendering code, custom UI components can override drawRect for custom rendering code [2] [2] Apple Docs: Implementing your drawing code
  • 8. VIEW PROPERTIES frame Frame rectangle in super view’s coordinate system center Center point in super view’s coordinate system bounds Frame of the view in its own coordinate system transform Affine transform that is applied to rotate/scale/ etc. the view, invalidates the frame
  • 9. VIEW PROPERTIES Frame: (10, 15, 280, 370) Bounds: (0, 0, 280, 370)Center (150, 200) 150 200 Origin (10, 15) Size (280, 370)
  • 11. AUTO LAYOUT Typically don’t set any view properties (frame, center, etc.) directly, instead use Auto Layout constraints to define view positions Make School has an extensive video tutorial series that teaches you how to work with Auto Layout
  • 12. SIZE CLASSES Default Layout Regular Width, Any Height
  • 13. SIZE CLASSES Size classes allow you to target different devices and device orientations with specific constraints Once you have selected a size class, constraints
 will be added only for that specific size class
  • 14. SIZE CLASSES If you modify an existing constraint, it will only be modified for this specific size class 0 is the value for size class Any x Any 20 is the value for size class Regular x Any
  • 15. AUTO LAYOUT IN CODE Most Auto Layout work should be done in Interface Builder, some dynamic features require Auto Layout in code
  • 16. AUTO LAYOUT IN CODE Modify existing constraints by creating an IBOutlet that references them: @IBOutlet var heightConstraint: NSLayoutConstraint! func moreButtonTapped() { heightConstraint.constant = 300 }
  • 17. AUTO LAYOUT IN CODE You can only change the constant property of the constraint, none of the other properties
  • 18. AUTO LAYOUT IN CODE For any other modification you need to deactivate existing constraints and activate new constraints newWidthConstraint = NSLayoutConstraint(item: orangeView, attribute: .Height, relatedBy: .Equal, toItem: view, attribute: .Height, multiplier: 0.7, constant: 0) heightProportionConstraint.active = false newWidthConstraint.active = true Deactivate existing constraint before activating new one
 to avoid angry error messages
  • 19. AUTO LAYOUT IN CODE Auto Layout API is very verbose You can use Visual Format Language instead [3]: 
 let verticalConstraints = NSLayoutConstraint.constraintsWithVisualFormat("V:|-200.0-[redView]-100.0-|", options: NSLayoutFormatOptions(rawValue: 0), metrics: ["targetWidth": 200], views: ["redView": redView]) [3] Apple Docs: Visual Format Language
  • 20. AUTO LAYOUT IN CODE Alternatively you can use third-party libraries, i.e. Cartography [4]: constrain(view1) { view1 in view1.width == 100 view1.height == 100 view1.center == view.superview!.center } [4] Carthography on GitHub
  • 21. MANAGING LAYOUT CYCLES setNeedsLayout: triggers update of layout constraint prior to next rendering layoutIfNeeded: triggers update of layout constraints immediately
  • 22. CUSTOMIZING LAYOUT layoutSubviews: Provides you with a hook to write custom layout code in case Auto Layout cannot be used
  • 23. ADDITIONAL RESOURCES View Programming Guide Make School Video Series on Auto Layout