Posted By

ibob on 02/07/13


Tagged


Versions (?)

Core


 / Published in: Other
 

  1. - (void)blinkAnimation:(NSString *)animationID finished:(BOOL)finished target:(UIView *)targetView
  2. {
  3. NSString *selectedSpeed = [[NSUserDefaults standardUserDefaults] stringForKey:@"EffectSpeed"];
  4. float speedFloat = (0.40 - [selectedSpeed floatValue]);
  5.  
  6. [UIView beginAnimations:animationID context:(__bridge void *)(targetView)];
  7. [UIView setAnimationDuration:speedFloat];
  8. [UIView setAnimationDelegate:self];
  9. [UIView setAnimationDidStopSelector:@selector(blinkAnimation:finished:targetView:)];
  10.  
  11. if([targetView alpha] == 1.0f)
  12. [targetView setAlpha:0.0f];
  13. else
  14. [targetView setAlpha:1.0f];
  15. [UIView commitAnimations];
  16. }
  17.  
  18. - (void)lblRetrieveBlinkAnimation
  19. {
  20.  
  21. [self blinkAnimation:@"blinkAnimation" finished:YES target:lblRetrievingData];
  22. }

Report this snippet  

You need to login to post a comment.