Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [_buttonCenterXConstraint setConstant:buttonCenterPoint.x];
- [_buttonCenterYConstraint setConstant:buttonCenterPoint.y];
- [UIView animateWithDuration:0.25f
- animations:^{
- [button layoutIfNeeded];
- }];
- UISnapBehavior *bounceBehaviour = [[[UISnapBehavior alloc] initWithItem:button snapToPoint:buttonCenterPoint];
- [bounceBehaviour setAction:^{
- [_buttonCenterXConstraint setConstant:buttonCenterPoint.x];
- [_buttonCenterYConstraint setConstant:buttonCenterPoint.y];
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement