transition - CATransition animation zoom change image (UIImageView) -
i try achieve zooming animation image change on uiimageview.
so far created transition of type movein , subtype fromleft:
catransition *transition = [catransition animation]; [transition setsubtype:kcatransitionfromleft]; [transition settype:kcatransitionmovein]; [transition setduration:1.5]; [[imageview layer] addanimation:transition forkey:nil]; but want zooming effect. created using cabasicanimation:
cabasicanimation *animation = [cabasicanimation animationwithkeypath:@"transition.scale"]; [animation setfromvalue:[nsvalue valuewithcatransform3d:catransform3dmakescale(0.0, 0.0, 1.0)]]; [animation settovalue:[nsvalue valuewithcatransform3d:catransform3dmakescale(1.0, 1.0, 1.0)]]; [animation setduration:1.5]; [[imageview layer] addanimation:animation forkey:nil]; my problem that, using second approach, image changes (old image gone) , animation comes in.
so it's animation , not transition (as names imply).
how can create transition zoom effect?
can use scale.
settransform:cgaffinetransformmakescale
Comments
Post a Comment