Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Mar 28, 2024
1 parent 6201a0c commit 135b282
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,34 @@ final class FirstViewController: FluidViewController {

To dismiss itself, call `fluidPop()`

## FluidGesture

![CleanShot 2024-03-29 at 04 11 57](https://github.com/FluidGroup/FluidInterfaceKit/assets/1888355/46087985-a052-4c87-b5ef-d5d0061b1ef9)

Making a view can be draggable in an easier way.
Supports dragging finished animation with moving another position respecting gesture's velocity using spring animation.
Rubber banding effect is built-in.

```swift
let draggableView: UIView

draggableView.makeDraggable(
descriptor: .init(
horizontal: .init(min: -200, max: 200, bandLength: 30),
vertical: .init(min: -200, max: 200, bandLength: 30),
handler: .init(
onStartDragging: {

},
onEndDragging: { velocity, offset, contentSize in
// return proposed offset to finish dragging
return .init(width: 0, height: 0)
}
)
)
)
```

---

[馃敆 **Detailed Documentation**](https://fluidgroup.github.io/FluidInterfaceKit/documentation/fluidinterfacekit/)
Expand Down

0 comments on commit 135b282

Please sign in to comment.