I am creating a method that shakes my UITfixfield and uses POP to lift heavy loads. .
- (zero) textFieldErrorAnimation {POPSpringAnimation * shake = [POPSpring authenticated with animation animation: kPOPLayerPositionX]; Shake.springBounciness = 10; Shake.velocity = @ (2000); [Self.value. Layer Pop_Aid Animation: Shake Fork: @ "Shake Value"]; [Self.year Player Pop_Aid animation: Shake for: @ "Shake you"]; } It seems that when I apply the animation to the object "Price", but when "same" and "year" are applied at the same time, then looks like.
I know that I can make a Shake2, Shake3, etc. so that each textfield is basically one but it sounds weird that I will need to do this.
Any ideas how can I reuse this animation?
Of course you can do what I'm really doing, to be used again like this The animated animation is preparing a way that returns the animation and setting the name and key values properly.
- (POPspring Animation *) PopShack Animation {POPSpringAnimation * shakeAnimation = [POPSpring Animation with Animation: kPOPLayerPositionX]; ShakeAnimation.velocity = @ 2000; Shake Animation .Prinbowness = 20; ShakeAnimation.name = @ "Shake Animation"; Return shake animation; }
And then whenever I want to shake any view, I just add them to the layer of the scene.
[self .textfield001.layer pop_add animation: [auto popshot animation] for: @ "Shake Animation"]; [Self. Testfield 002 Layer Pop_Aid Animation: Key for [self pop-up animation]: @ "Shake Animation"]; [Self. Testfield 003 Layer Pop_Aid animation: [Self pop-up animation]: @ "Shake Animation"]; Just remember to set an important value for the name that you created with the animation in the first names.
No comments:
Post a Comment