1. 程式人生 > >UIView animateWithDuration: delay: options: animations: completion:

UIView animateWithDuration: delay: options: animations: completion:

//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]; }];