Core Animation arbeitet nicht mit "Alpha" -Wert
Bevor dieser code, der mein Film-pic alpha auf 0 gesetzt ist,
CABasicAnimation* fadein= [CABasicAnimation animationWithKeyPath:@"alpha"];
[fadein setToValue:[NSNumber numberWithFloat:1.0]];
[fadein setDuration:0.5];
[[moviepic layer]addAnimation:fadein forKey:@"alpha"];
Nichts passiert, wenn ich alpha auf 0,5 im Vorfeld statt, die alpha bleibt bei 0,5 und nicht animieren zum 1.
Habe ich gesehen, dass ein code mit UIView beginAnimations:
herum, aber ich unterrichte, core animation, so fragte ich mich, warum CABasicAnimation können nicht einfache Aufgabe wie diese?
InformationsquelleAutor der Frage 5argon | 2011-09-23
Du musst angemeldet sein, um einen Kommentar abzugeben.
UIView stellt diese als
alpha
wo, wie CALayer stellt diese alsopacity
.InformationsquelleAutor der Antwort ohho
@ohho beantwortet die Frage gepostet. Mir wird ein bisschen mehr generisch. Für eine Liste, was die können und wie Sie animiert werden, mit
CABasicAnimation
entnehmen Sie bitte Die Dokumentation von AppleInformationsquelleAutor der Antwort Julian Król