LayoutKit Versions Save

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

2.1.1

7 years ago

2.1.0

7 years ago

LayoutKit is now safe to use in App Extensions (#48).

2.0.1

7 years ago

Fixes bug with LabelLayout when numberOfLines > 0 (#38)

2.0.0

7 years ago

This release contains new features and backwards incompatible API changes.

Features

LayoutKit now supports:

  • Animating between two different layouts (documentation)
  • macOS and tvOS
  • min/max height/width constraints on SizeLayout
  • Incremental updates with ReloadableViewLayoutAdapter

Backward incompatible changes

  • All base layout now expose a generic view parameter, similar to SizeLayout in 1.x.

    InsetLayout<V: UIView>
    LabelLayout<L: UILabel>
    SizeLayout<V: UIView>
    StackLayout<V: UIView>
    

    Subclasses of these layouts should use this generic parameter to customize the view created instead of overriding makeView.

  • Due to generic parameters, some nested types needed to be renamed

    StackLayout.Distribution -> StackLayoutDistribution
    LabelLayout.TextType -> LabelLayoutTextType
    
  • New ConfigurableLayout protocol that all custom layouts should implement (instead of just Layout).

  • Layout protocol's makeView function now requires a viewRecycler parameter to support animations. ConfigurableLayout provides an implementation for this method.

  • Layout protocol now requires a configure method. Previously creating a view and configuring it happened in makeView but now it has been split into two functions. ConfigurableLayout provides an implementation for this method.

  • Layout protocol now requires a viewReuseId to help with animations and view reuse.

  • PositioningLayout is now BaseLayout

  • LayoutAxis renamed to Axis

  • Certain APIs have been updated to be consistent with Swift 3 style guidelines

    makeViews(inView view: UIView) -> makeViews(in view: UIView)
    position(size size: CGSize, inRect rect: CGRect) -> position(size size: CGSize, in rect: CGRect)
    
  • There are some new shim types to help support multiple platforms

    View -> UIView or NSView
    Application -> UIApplication or NSApplication
    EdgeInsets -> UIEdgeInsets or NSEdgeInsets
    etc
    

1.1.0

7 years ago

ReloadableViewLayoutAdapter is now public.

1.0.0

7 years ago

Open source!