All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Expose
forceLayout
inEpoxySwiftUIHostingView
for updating the hosting view size from outside. - Added
CollectionViewConfiguration.usesSafeAreaLayoutGuideLeadingTrailingAnchors
to respect leading/trailing layoutGuide anchors which are needed for landscape orientation. Defaults tofalse
and uses the view'sleadingAnchor
andtrailingAnchor
. Whentrue
it will use the view'ssafeAreaLayoutGuide
leadingAnchor
andtrailingAnchor
.
AnyItemModel
now implements theErasedContentProviding
protocol.- Updated
ErasedContentProviding
protocol to use its type name instead ofSelf
in the keys of itsEpoxyModelProperty
propertiescontentProperty
andisContentEqualProperty
.
- Fixed an issue causing incorrect view callbacks and a corresponding assertion when a view disappears during a collection view update and is only in the post-update data.
- Removed non-functioning
accessibilityDelegate
and associated code. - Fixed a possible index out of bounds assertion when accessing
visibilityMetadata
during a batch update. - Added caching for
visibilityMetadata
calculations. - Fixed an issue that could cause SwiftUI views to be incorrectly sized in a collection view.
- Added
forcesEarlySwiftUIRendering
flag toCollectionViewConfiguration
to test a SwiftUI layout approach to resolve an issue that could cause collection view cells to layout with unexpected dimensions - Made new layout-based SwiftUI cell rendering option the default.
- Fixed interaction of SwiftUI bars on visionOS
- Added flag for forcing layout on a hosted SwiftUI view after layout margins change
- Updated
EpoxySwiftUIHostingController
with a flag to disable its keyboard avoidance behavior
0.10.0 - 2023-06-29
- Dropped support for Swift 5.4.
- EpoxyCore now supports macOS and tvOS.
- Renamed EpoxyCore's
SwiftUIUIView
toSwiftUIView
. - Renamed EpoxyCore's
MeasuringUIViewRepresentable
toMeasuringViewRepresentable
. - Added
UIScrollView.keyboardAdjustsBottomBarOffset
escape hatch to disable bottom bar keyboard avoidance for cases where the keyboard is avoided at a higher level (e.g. aUIPresentationController
subclass). - Added
configuredView(traitCollection:)
API toSupplementaryItemModeling
. - Changed
NavigationModel
'sremove()
method access modifier to public (previously internal). - Changed
NavigationModel
'shandleDidRemove()
method access modifier to public (previously internal).
- For top and bottom bars, if any view in the hierarchy has a scale transform, wait to apply the insets as they may be incorrect.
- Pass initial size to embedded view from
CollectionViewCell
/CollectionViewReusableView
to better load embedded SwiftUI views. - Guard against a UIKit crash caused by attempting to scroll to an item that no longer exists.
0.9.0 - 2022-10-25
- Remove all of the
EpoxyableView
flavors ofMeasuringUIViewRepresentable
in favor of a single sharedSwiftUIUIView
that supports a genericStorage
, which has the added benefit of fixing some Xcode preview crashes.
- Improved double layout pass heuristics for views that have intrinsic size dimensions below 1 or for views that have double layout pass subviews that aren't horizontally constrained to the edges.
- Fixed HGroupItem and VGroupItem not respecting some properties of the style that is passed in.
- Improved sizing of intrinsically sized UIViews in SwiftUI with no intrinsic metric size proposals.
- Add extra logic for mitigating proposed sizes that match previous intrinsic size for hosted UIViews in SwiftUI.
0.8.0 - 2022-07-28
- Added
SwiftUIMeasurementContainer
for calculating the ideal height of aUIView
for wrapping for SwiftUI usage. - Added
MeasuringUIViewRepresentable
as a convenience API for measuring aUIView
within aUIViewRepresentable
using an enclosingSwiftUIMeasurementContainer
. - Added a method to
CollectionViewReorderingDelegate
to check the reordering destination is expected. - Added the ability to pass a
CollectionViewConfiguration
to theCollectionViewController
initializers. - Added additional sizing behaviors to
SwiftUIMeasurementContainer
for sizingUIView
s hosted in a SwiftUIView
. - Added a static
swiftUIView(…)
method toUIView
for hosting UIKit views that aren'tEpoxyableView
s while still leveraging the layout helpers. - Added support for calling
configure { _ in }
on the SwiftUIView
resulting from aswiftUIView(…)
invocation to perform additional configuration of theUIView
instance. - Added
LayoutGroupUpdateAnimation
for customizingGroup
animated updates. - Added support for
WillDisplay
callbacks to be added to type-erasedAnyBarModel
types.
- Fixed sizing of reused
EpoxySwiftUIHostingController
s on iOS 15.2+. - Fixed crash in
ScrollToItemHelper
caused bypreferredFrameRateRanges
on devices running iOS 15.0 (this issue is not present in devices on 15.1+) - Fixed an ambiguous layout issue when using
LayoutSpacer
without afixedWidth
orfixedHeight
. - Gracefully support cases where a
SwiftUIMeasurementContainer
with anintrinsicSize
SwiftUIMeasurementContainerStrategy
has an intrinsic size that exceeds the proposed size by compressing rather than overflowing, which could result in broken layouts. - Fixed intrinsic size invalidation triggered by a SwiftUI view from within a collection view cell by invalidating the enclosing collection view layout.
- Fixed an issue where
EpoxyLogger.shared.assertionFailure
andEpoxyLogger.shared.assert
would unexpectedly crash in release builds.
- Updated name of
Spacer
toLayoutSpacer
to avoid name conflict with SwiftUI'sSpacer
- Updated to have Swift 5.4 as the minimum supported Swift version (previously Swift 5.3).
- Updated
HGroupView
andVGroupView
to haveinsetsLayoutMarginsFromSafeArea = false
by default - Gated an old autoresizing-mask-related bug workaround to only run on iOS versions 13 and below
- The
swiftUIView(…)
methods now default to an automatic sizing behavior that makes a best effort at sizing the view based on heuristics, rather than defaulting to intrinsic height and proposed width.
0.7.0 - 2021-12-09
- Added a weak reference from
TopBarContainer
/BottomBarContainer
to their parent bar installer - Added a
BarInstallerConfiguration
type to allow both global and per-instance configuration of bar installers. - Added an
applyBars
closure toBarInstallerConfiguration
to allow consumers to configure when bars are applied to the underlyingBarContainer
by a bar installer, e.g. to defer bar model updates that might conflict with an in-flight shared element transition. - Support for hitting 120 FPS on iPhone ProMotion displays when programmatically scrolling to an item in a collection view.
- Added
itemModel(…)
,barModel(…)
methods to host a SwiftUIView
within an Epoxy container and theswiftUIView(…)
method to host anEpoxyableView
within a SwiftUIView
- Added a SwiftUI environment value for requesting size invalidation of the containing Epoxy collection view cell.
- Fixes an issue that could cause
CollectionView
scroll animation frames to have an incorrect content offset when paired with a non-zeroadjustedContentInset
. - Fixes an issue that could cause
VGroupView
andHGroupView
to grow too tall when nested in containers that give them a larger height than their natural height. - Fixes a bug in the
KeyboardPositionWatcher
that would consider an even slightly offscreen view as having a keyboard overlap when the keyboard is dismissed, resulting in incorrect keyboard offsets. - Fixes an issue when mutating state synchronously does not pick up the current SwiftUI transaction.
- Fixes a bug where the
avoidsKeyboard
parameter would be disregarded in aBottomBarInstaller
initializer.
- Removed the default bar installer behavior where bar model updates were deferred while a view controller transition is in progress.
0.6.0 - 2021-08-31
- Added an
insetMargins
property toTopBarContainer
andBottomBarContainer
that configures whether or not the container sets layout margins derived from thesafeAreaInsets
of itsviewController
.
- Fixed incorrect assertion logging when accessing an item with an invalid index path.
- Mitigated a
EXC_BAD_ACCESS
crash that caused by a badnonnull
bridge inCollectionViewCell
. - Fixed an issue where styles were not being used in the
diffIdentifier
calculation ofGroupItems
.
- The
SectionModel
initializer now requires adataID
to make it harder to have sections with duplicate identity that causes a runtime warning and potentially unexpected diffing behavior.
0.5.0 - 2021-06-23
- Added an
UpdateStrategy
toCollectionView
to allow specifying that it should update using non- animatedperformBatchUpdates(…)
, which can be more performant and behave more predictably thanreloadData()
. - Added
reflowsForAccessibilityTypeSizes
andforceVerticalAccessibilityLayout
properties toHGroup.Style
.
- Improved
CollectionView
logic for deciding when toreloadData(…)
overperformBatchUpdates(…)
in specific scenarios. - Fixed an issue where the
accessibilityAlignment
property ofHGroup
was not being respected. - Fixed an issue where
accessibilityAlignment
andhorizontalAlignment
would overwrite one another. - Break a temporary retain cycle in
.system
presentation style
CollectionViewConfiguration.usesBatchUpdatesForAllReloads
now defaults totrue
.- Changed
CollectionViewConfiguration
from an immutableclass
to astruct
to make it easier to modify an existing configuration.
0.4.0 - 2021-05-17
- Added an example with text field to show how can we use
avoidsKeyboard
feature - Add EpoxyLayoutGroups, a declarative API for creating components
AnyItemModel
is selectable when there are noDidSelect
callbacks on the underlying model
0.3.0 - 2021-04-23
- Added support for
Array
andOptional
expressions to model result builders - Added support for
Optional
expressions toPresentationModel
result builders - Made
AnyItemModel
andAnySupplementaryItemModel
conform toDidChangeStateProviding
,DidChangeStateProviding
andSetBehaviorsProviding
- Made
AnyItemModel
,AnySupplementaryItemModel
, andAnyBarModel
conform toStyleIDProviding
- Adds a
keyboardContentInsetAdjustment
property toUIScrollView
with the amount that the that itscontentInset.bottom
has been adjusted to accommodate for the keyboard by aKeyboardPositionWatcher
- Made
ItemSelectionStyle
conform toHashable
ReuseIDStore
has a new method to vend a previously registered reuse ID,registeredReuseID(for:)
- Bar installers gracefully handle redundant calls to install/uninstall
CollectionView
more gracefully handles styleID mutations after registration
ReuseIDStore.registerReuseID(for:)
has been renamed toReuseIDStore.reuseID(byRegistering:)
0.2.0 - 2021-03-16
- Added result builders for
SectionModel
,ItemModel
,BarModel
,PresentationModel
, andNavigationModel
- Added initializers and methods to
CollectionViewController
that take an array ofItemModel
s and transparently wrap them in aSectionModel
for consumers.
- Updated public let properties of public structs with memberwise initializers to be public var
BarStackView
now handles selection of bar models and can be used as anEpoxyableView
- The cases of
BarStackView.ZOrder
have been renamed to be more semantically accurate - Enables
CollectionView
prefetching by default, as the issues preventing it from being enabled by default are now resolved in recent iOS versions - Support animated moves in
BarStackView
- Fixed ordering when inserting and removing bar models
- Crossfade between bars of the same view type with different style IDs in
BarStackView
0.1.0 - 2021-02-01
- Initial release of Epoxy