Created
December 22, 2016 11:11
-
-
Save andresbrun/91ccdef02f7b3d32e3d1b4a071659c29 to your computer and use it in GitHub Desktop.
Shows how to configure a sliding behaviour
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 slidingBehaviour = UIAttachmentBehavior.slidingAttachment(with: targetView, | |
attachedTo: draggableView, | |
attachmentAnchor: targetView.center, | |
axisOfTranslation: CGVector(dx: 1, dy: 0)) | |
animator.addBehavior(slidingBehaviour) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment