Releases: LinkedInAttic/LayoutKit
2.1.1
2.1.0
LayoutKit is now safe to use in App Extensions (#48).
2.0.1
2.0.0
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 justLayout
). -
Layout
protocol'smakeView
function now requires aviewRecycler
parameter to support animations.ConfigurableLayout
provides an implementation for this method. -
Layout
protocol now requires aconfigure
method. Previously creating a view and configuring it happened inmakeView
but now it has been split into two functions.ConfigurableLayout
provides an implementation for this method. -
Layout
protocol now requires aviewReuseId
to help with animations and view reuse. -
PositioningLayout
is nowBaseLayout
-
LayoutAxis
renamed toAxis
-
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
ReloadableViewLayoutAdapter is now public.
1.0.0
Open source!