Created
January 24, 2017 21:37
-
-
Save jverkoey/74a7ff65eaa4f12db763ccd8375e87a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let square2Reactive = runtime.get(square2.layer) | |
let pan = runtime.get(UIPanGestureRecognizer()) | |
let rawPosition = createProperty(withInitialValue: square2.layer.position) | |
runtime.add(pan.translated(from: rawPosition, in: view), to: rawPosition) | |
runtime.add(rawPosition.y().rubberBanded(below: 50, above: 400, length: 100), to: square2Reactive.positionY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment