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

4.0.0

Compare
Choose a tag to compare
@nicksnyder nicksnyder released this 24 Nov 18:31
· 99 commits to master since this release

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 to Text now that it is shared with ButtonLayout.
  • LabelLayout initializer parameter textType renamed to text.
  • needsView was moved from ConfigurableLayout to Layout.
  • func makeView(from recycler: ViewRecycler) -> View? changed to func makeView() -> View. LayoutKit now handles view recycling internally and only calls makeView() if needsView 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.