LayoutTransition

public enum LayoutTransition

The transition used when layout attributes change for a view during an update cycle.

‘Inherited’ transitions: the ‘inherited’ transition is determined by searching up the tree (not literally, but this is the resulting behavior). The nearest ancestor that defines an animation will be used, following this logic:

  • Ancestors with a layout transition of none will result in no inherited animation for their descendents.
  • Ancestors in the tree with a layout transition of inherited will be skipped, and the search will continue up the tree.
  • Any ancestors in the tree with a layout transition of inheritedWithFallback will be used if they do not themselves inherit a layout transition from one of their ancestors.
  • Ancestors with a layout transition of specific will always be used for their descendents inherited animation.
  • If no ancestor is found that specifies a layout transition, but the containing BlueprintView has the element property assigned from within a UIKit animation block, that animation will be used as the inherited animation.
  • The view will never animate layout changes.

    Declaration

    Swift

    case none
  • Layout changes will always animate with the given attributes.

    Declaration

    Swift

    case specific(_: AnimationAttributes = .default)
  • The view will only animate layout changes if an inherited transition exists.

    Declaration

    Swift

    case inherited
  • The view will animate along with an inherited transition (if present) or the specified fallback attributes.

    Declaration

    Swift

    case inheritedWithFallback(_: AnimationAttributes = .default)