Artwork

Innhold levert av 5by5 Broadcasting. Alt podcastinnhold, inkludert episoder, grafikk og podcastbeskrivelser, lastes opp og leveres direkte av 5by5 Broadcasting eller deres podcastplattformpartner. Hvis du tror at noen bruker det opphavsrettsbeskyttede verket ditt uten din tillatelse, kan du følge prosessen skissert her https://no.player.fm/legal.
Player FM - Podcast-app
Gå frakoblet med Player FM -appen!

107: Hit the TIE Fighter

1:17:58
 
Del
 

Manage episode 125517931 series 27172
Innhold levert av 5by5 Broadcasting. Alt podcastinnhold, inkludert episoder, grafikk og podcastbeskrivelser, lastes opp og leveres direkte av 5by5 Broadcasting eller deres podcastplattformpartner. Hvis du tror at noen bruker det opphavsrettsbeskyttede verket ditt uten din tillatelse, kan du følge prosessen skissert her https://no.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 episoder

Artwork

107: Hit the TIE Fighter

iOhYes

published

iconDel
 
Manage episode 125517931 series 27172
Innhold levert av 5by5 Broadcasting. Alt podcastinnhold, inkludert episoder, grafikk og podcastbeskrivelser, lastes opp og leveres direkte av 5by5 Broadcasting eller deres podcastplattformpartner. Hvis du tror at noen bruker det opphavsrettsbeskyttede verket ditt uten din tillatelse, kan du følge prosessen skissert her https://no.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 episoder

Alle episoder

×
 
Loading …

Velkommen til Player FM!

Player FM scanner netter for høykvalitets podcaster som du kan nyte nå. Det er den beste podcastappen og fungerer på Android, iPhone og internett. Registrer deg for å synkronisere abonnement på flere enheter.

 

Hurtigreferanseguide

Copyright 2024 | Sitemap | Personvern | Vilkår for bruk | | opphavsrett