iphone - Make uibutton pulsate. -
I'm trying to create a UIButton that has an image in it, gradually changing the alpha level and gradually blur Seeing Loading ...
Currently I am doing this but it does nothing ....
- (zero) loopdaleop {while ( MyCount & lt; 1000) {[UIView Animated Width: 3.0 Delay: 0.0F Option: UIViewAnimationCurveEaseOut Animation: ^ {iconButton.alpha = 0.0; } Closing: ^ (BOOL Finish) {if (Ended) {NSLog (@ "Animated"); }}]; [UIView Animation: 3.0 Delay: 0.0f Option: UIViewAnimationCurveEaseOut Animation: ^ {iconButton.alpha = 1.0; } Closing: ^ (BOOL Finish) {if (Ended) {NSLog (@ "Animated"); }}]; MyCount ++; }} This method is called by the ViewedLoad method,
I know very crude, but my best effort, if you know it How can I achieve it? It will be highly appreciated.
viewDidLoad in your button layer: CABasicAnimation * pulseAnimation = [CABasicAnimation Animation WithKeyPath: @ "transform.scale"]; PulseAnimation.duration = .5; Pulse animation. To value = [nsnumber no. Float: 1.1]; Pulse animation. TimingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; Pulse Animation. AutoWorvers = Yes; Pulse animation.repeatcode = FLT_MAX; [Your button. Add Player Animation: Pulse Animation Fork: Nile]; And you can experiment with it.
Comments
Post a Comment