Skip to content

Commit

Permalink
Update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Mar 28, 2024
1 parent af349ce commit 78b2cb8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ final class DemoDragViewController: UIViewController {
super.viewDidLoad()

let draggableView = UIView()
draggableView.backgroundColor = .blue
draggableView.backgroundColor = .systemBlue

Mondrian.buildSubviews(on: self.view) {
ZStackBlock {
Expand All @@ -21,7 +21,15 @@ final class DemoDragViewController: UIViewController {
descriptor: .init(
horizontal: .init(min: -200, max: 200, bandLength: 30),
vertical: .init(min: -200, max: 200, bandLength: 30),
handler: .init(onEndDragging: { _, _, _ in .init(width: 0, height: 0) })
handler: .init(
onStartDragging: {

},
onEndDragging: { velocity, offset, contentSize in
// return proposed offset to finish dragging
return .init(width: 0, height: 0)
}
)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,8 @@ public final class FluidTooltipContainerView<ContentView: UIView>: UIView {
}

}

@available(iOS 17, *)
#Preview {
DemoPopoverViewController()
}

0 comments on commit 78b2cb8

Please sign in to comment.