Animacion wobble: Like home screen deleting an app

extension BinaryInteger { var degreesToRadians: CGFloat { return CGFloat(Int(self)) * .pi / 180 } } extension FloatingPoint { var degreesToRadians: Self { return self * .pi / 180 } var radiansToDegrees: Self { return self * 180 / .pi } } //MARK: ANIMATIONS extension ViewController { fileprivate func startWobble(_ view: UIView) { let degrees: CGFloat = 5.0 let animation = CAKeyframeAnimation(keyPath: "transform.rotation.z") animation.duration = 0.6 animation.isCumulative = true animation.repeatCount = Float.infinity animation.values = [0.0, ((-degrees) * 0.25).degreesToRadians, 0.0, ((degrees) * 0.5).degreesToRadians, 0.0, ((-degrees)).degreesToRadians, 0.0, ((degrees)).degreesToRadians, 0.0, ((-degrees) * 0.5).degreesToRadians, 0.0, ((degrees) * 0.25).degreesToRadians, 0.0] animation.fillMode = kCAFillModeForwards; animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) animation.isRemovedOnCompletion = true view.layer.add(animation, forKey: "wobble") } fileprivate func endWobble(_ view: UIView) { view.layer.removeAllAnimations() view.transform = CGAffineTransform.identity view.layer.anchorPoint = CGPoint(x: 0.5, y: 0.5) } }

1 Response


Forskolin SlimXtra :- To know how this constituent will function in your body, essentially look underneath.Like determined over, the sole energy of Forskolin Slimxtra comes absolutely from FORSKOLIN EXTRACT that is the primary element of this equation.This fixing is known for keeping down your entire health. However, it for the most part attempts to empower the intracellular level of CYCLIC ADENOSINE MONOPHOSPHATE additionally noted as CAMP.This whole procedure brings about solid weight reduction.
http://newfitnesssupplements.com/forskolin-slimxtra/

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.