We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, is it possible to restart animation so that when the user comes back on the screen the bubbles will be animated from besides to center?
The text was updated successfully, but these errors were encountered:
I can add a function to restart the animation. However in the meanwhile you can add this extension to adjust the node position.
extension Magnetic { func restartAnimation() { for (index, node) in children.enumerated() { let x = (index % 2 == 0) ? -node.frame.width : frame.width + node.frame.width let y = CGFloat.random(node.frame.height, frame.height - node.frame.height) node.position = CGPoint(x: x, y: y) } } }
Sorry, something went wrong.
@efremidze just FYI where i use it is upon device rotation when my container resizes - it seems out of the box this is not handled by Magnetic.
No branches or pull requests
Hi,
is it possible to restart animation so that when the user comes back on the screen the bubbles will be animated from besides to center?
The text was updated successfully, but these errors were encountered: