UIView animateWithDuration: delay: options: animations: completion:
阿新 • • 發佈:2019-01-10
//UIImageRenderingModeAlwaysTemplate Always draw the image as a template image, ignoring its color information
UIImage *syncImage = [self.syncImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
self.syncImageView.image = syncImage;
[UIView animateWithDuration:3.0f
delay:0.0 f
options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionBeginFromCurrentState)
animations:^{
self.syncImageView.tintColor = [UIColor orangeColor];
} completion:^(BOOL finished){
self.syncImageView.tintColor = [UIColor lightGrayColor];
}];