iphone - Want a flickering UIImageView (CoreAnimation and alpha-value) -


I would like a UIImageView that I can make it with the core animation and alpha-value of Flickr. I tried to do this:

 for  (int a = 1; a & lt; = 100; a ++) {schwarz.alpha = 0.7; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Crow: UIViewAnimationCurveEaseIn]; [UIView Set Animation Duration: 1]; Schwarz Alpha = 0,1; [UIView commitAnimations]; }  

But it works only if it goes to 0.1 and then not for 0.7. I also tried:

  schwarz.alpha = 0.7; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Crow: UIViewAnimationCurveEaseIn]; [UIView Set Animation Duration: 1]; Schwarz.alpha = 0.1; [UIView commitAnimations]; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Crow: UIViewAnimationCurveEaseIn]; [UIView Set Animation Duration: 1]; Schwarz.alpha = 1; [UIView commitAnimations]; [UIView commitAnimations]; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Crow: UIViewAnimationCurveEaseIn]; [UIView Set Animation Duration: 1]; Schwarz.alpha = 3; [UIView commitAnimations]; // and so on ...  

And then it works. How do I apply flickering? Thanks!

The problem with your code is that the [UIView commitAnimation] method is not blocked - I mean That code implementation is in progress and the animation is done asynchronously. So, in fact, what is happening is that you first go through all loop iterations and the animation is done from 0.7 to 1.0 ...

just use the setAnimationDidStopSelector without the "for" loop Please.

  Schwarz.Lafe = 0.7; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Crow: UIViewAnimationCurveEaseIn]; [UIView Set Animation Duration: 1]; [UIView Set Delegate Animation: self]; [UIView Set AnimationDesettop Selector: @Selector (AnimationDisStop: End: Reference :)]; Schwarz.alpha = 0.1; [UIView commitAnimations]; The method of capture can be:  
  - (zero) animation dysstop: (nssting *) end of the animation id: (nsnm *) end reference: (zeros *) reference {/ * your words are here ... * /}  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -