Repository navigation
Beta 0.8.0
This release introduces a significant enhancement to the DynamicBottomSheet API by duplicating the existing functionality of the DynamicBottomSheetDetentsSubscriber protocol using Combine's PassthroughSubject.
Previously, you can subscribe with protocol:
public protocol DynamicBottomSheetDetentsSubscriber {
func bottomSheet(
_ bottomSheet: DynamicBottomSheet,
didChangePosition position: RelativePosition,
source: DynamicBottomSheet.YChangeSource
)
}With this release, you can now also subscribe to changes using Combine. We have added some PassthroughSubjects to the DynamicBottomSheet, like:
public let onChangePosition = PassthroughSubject<DidChangePositionContext, Never>()This provides a more modern and flexible way to handle updates, allowing seamless integration into reactive pipelines. Developers can now choose their preferred mechanism—protocol-based delegation or Combine-based reactive streams—to handle events.
The new Combine-based API does not break existing functionality. Protocol-based subscription will continue to work as before, ensuring full backward compatibility.
This change empowers developers working on a reactive architecture while maintaining support for the existing delegate-based approach.