This repository has been archived by the owner on Feb 17, 2021. It is now read-only.
4.0.0
This release contains some new features and backward incompatible changes.
Features
- New ButtonLayout for UIButton. Please read the class documentation before using.
- Layouts now support views whose initializers require arguments (i.e. UIButton).
- BatchUpdates now supports reloading sections and items (thanks @RoCry).
Backward incompatible changes
LabelLayoutTextType
renamed toText
now that it is shared with ButtonLayout.- LabelLayout initializer parameter
textType
renamed totext
. needsView
was moved from ConfigurableLayout to Layout.func makeView(from recycler: ViewRecycler) -> View?
changed tofunc makeView() -> View
. LayoutKit now handles view recycling internally and only callsmakeView()
ifneedsView
is true.- ViewRecycler is no longer public (it doesn't need to be anymore).
Behavior changes
- A non-nil viewReuseId no longer forces a Layout to generate a view. If you want to force a Layout to generate a view when it otherwise wouldn't, provide a configuration block (which may be empty).
- Subview order is now deterministic and matches what you would expect.
Other
LayoutKitExampleLayouts target renamed to ExampleLayouts so that it isn't inadvertently pulled in by Carthage. ExampleLayouts is for experimentation and not part of the supported or documented public API of LayoutKit.