2016-04-20 16 views
1

I UIImageView, die ich UIImage bin Zuordnung nach iv'eAnimate UIImageView Tönungsfarbe dosent Arbeit

angewendet
imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate) 

auf das Bild.

Ich versuche, die Tönung singen diesen Code zu animieren:

UIView.transitionWithView(imageV!, duration: 0.275, options: [.BeginFromCurrentState , .TransitionCrossDissolve], animations: {() -> Void in 
     imageV?.tintColor = globalColor 
     imageV?.setNeedsDisplay() 
     }, completion: nil) 

Aber es ist einfach zu springen auf die endgültige Farbe. Irgendwelche Vorschläge? Vielen Dank!

+0

sind u dieses Problem beheben? – puko

+0

@puko Noch nicht .. –

Antwort

0

Für Objective-C sieht es so aus:

[UIView animateWithDuration:0.25f 
         delay:0.0f 
        options:UIViewAnimationOptionBeginFromCurrentState 
       animations:^ 
{ 
    imageView.tintColor = color; 
} 
       completion:nil];