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

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -