iphone - CALayer transformation - anchorPoint problem -
i work on card flip animation coreanimation. layer want animation uiview uiimageviews subviews. animation approach:
cabasicanimation *animation = [cabasicanimation animationwithkeypath:@"transform"]; animation.duration=2.0f; animation.repeatcount=1; animation.fromvalue = [nsvalue valuewithcatransform3d:catransform3dmakerotation(0.0, 0, 1, 0)]; animation.tovalue = [nsvalue valuewithcatransform3d:catransform3dmakerotation(m_pi, 0, 1, 0)]; animation.removedoncompletion = no; animation.fillmode = kcafillmodeforwards; [layer addanimation:animation forkey:@"flip"]; the problem anchor point of layer seems wrong because animates view @ point x = 0. anchor point of layer has value (0.5, 0.5)
any suggestions?
Comments
Post a Comment