Artwork

Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

107: Hit the TIE Fighter

1:17:58
 
Share
 

Manage episode 125517931 series 27172
Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Discussion

Auto Layout

  • Stack Views, FTW (Auto Layout without constraints) (New in iOS 9, similar to what’s available in watchOS and NSStackView, which is available from OS X 10.9)
  • UILayoutGuide
    • New in iOS 9
    • Defines a rectangular geometry that can interact with Auto Layout
    • Eliminates the need (in many cases, at least) for views that are included solely for layout purposes (container views, spacing views, etc)
    • Views can still provide a greater degree of encapsulation
    • Provide anchors that can be used to generate constraints
  • Anatomy of constraints
    • The layout of your view hierarchy is defined as a series of linear equations. Each constraint represents a single equation. Your goal is to declare a series of equations that has one and only one possible solution.
    • Two basic types of attributes
  • Size attributes (for example, Height and Width)
  • Location attributes (for example, Leading, Left, and Top)
  • The following rules apply:
    • You cannot constrain a size attribute to a location attribute.
    • You cannot assign constant values to location attributes.
    • You cannot use a nonidentity multiplier (a value other than 1.0) with location attributes.
    • For location attributes, you cannot constrain vertical attributes to horizontal attributes.
    • For location attributes, you cannot constrain Leading or Trailing attributes to Left or Right attributes.
  • Rule of Thumb for clarity
    • Whole number multipliers are favored over fractional multipliers.
  • Positive constants are favored over negative constants.
  • Wherever possible, views should appear in layout order: leading to trailing, top to bottom.
  • Constraint Priorities
    • 1000 is required
    • < 1000 is optional
  • Intrinsic Content Size
    • Content Compression Resistance
    • Content Hugging
  • Debugging Auto Layout
    • Error Types
      • Unsatisfiable Layouts. Your layout has no valid solution.
        • Usually 2 or more required constraints conflict
    • Ambiguous Layouts. Your layout has two or more possible solutions.
       * Need additional constraints 
      • conflicting optional constraints
    • Logical Errors. There is a bug in your layout logic.
  • Tips and Tricks
    • take advantage of the logs
    • use meaning identifiers on views and constraints
    • Debug > View Debugging > Show Alignment Rectangles

Picks

Darryl

Nolan

John

  continue reading

100 episodes

Artwork

107: Hit the TIE Fighter

iOhYes

published

iconShare
 
Manage episode 125517931 series 27172
Content provided by 5by5 Broadcasting. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by 5by5 Broadcasting or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Discussion

Auto Layout

  • Stack Views, FTW (Auto Layout without constraints) (New in iOS 9, similar to what’s available in watchOS and NSStackView, which is available from OS X 10.9)
  • UILayoutGuide
    • New in iOS 9
    • Defines a rectangular geometry that can interact with Auto Layout
    • Eliminates the need (in many cases, at least) for views that are included solely for layout purposes (container views, spacing views, etc)
    • Views can still provide a greater degree of encapsulation
    • Provide anchors that can be used to generate constraints
  • Anatomy of constraints
    • The layout of your view hierarchy is defined as a series of linear equations. Each constraint represents a single equation. Your goal is to declare a series of equations that has one and only one possible solution.
    • Two basic types of attributes
  • Size attributes (for example, Height and Width)
  • Location attributes (for example, Leading, Left, and Top)
  • The following rules apply:
    • You cannot constrain a size attribute to a location attribute.
    • You cannot assign constant values to location attributes.
    • You cannot use a nonidentity multiplier (a value other than 1.0) with location attributes.
    • For location attributes, you cannot constrain vertical attributes to horizontal attributes.
    • For location attributes, you cannot constrain Leading or Trailing attributes to Left or Right attributes.
  • Rule of Thumb for clarity
    • Whole number multipliers are favored over fractional multipliers.
  • Positive constants are favored over negative constants.
  • Wherever possible, views should appear in layout order: leading to trailing, top to bottom.
  • Constraint Priorities
    • 1000 is required
    • < 1000 is optional
  • Intrinsic Content Size
    • Content Compression Resistance
    • Content Hugging
  • Debugging Auto Layout
    • Error Types
      • Unsatisfiable Layouts. Your layout has no valid solution.
        • Usually 2 or more required constraints conflict
    • Ambiguous Layouts. Your layout has two or more possible solutions.
       * Need additional constraints 
      • conflicting optional constraints
    • Logical Errors. There is a bug in your layout logic.
  • Tips and Tricks
    • take advantage of the logs
    • use meaning identifiers on views and constraints
    • Debug > View Debugging > Show Alignment Rectangles

Picks

Darryl

Nolan

John

  continue reading

100 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide