Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Releases: LinkedInAttic/LayoutKit

2.1.1

14 Sep 00:52
Compare
Choose a tag to compare

2.1.0

12 Sep 17:10
Compare
Choose a tag to compare

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

2.0.1

24 Aug 03:28
Compare
Choose a tag to compare

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

2.0.0

22 Aug 21:38
Compare
Choose a tag to compare

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

23 Jun 17:23
Compare
Choose a tag to compare

ReloadableViewLayoutAdapter is now public.

1.0.0

23 Jun 00:07
Compare
Choose a tag to compare

Open source!