iPhone, How do I rotate an UIImageView around a point using Core Animation and CATransform3D? -


This is what I want to do:

  (1) (2) | / | / | / | I want to transfer a UIImageView equivalent to the point (2) around the position (2) to the position of a clock pin (width: 9px, height 73px) (/) / (3)  

My DegreeToRadians defined the macro as follows: Received:

  #define degreesToRadian (x) (M_PI * (x) / 180.0)  

/ * kmPointer is UIImageView * /

NSValue * value = zero; CABasicAnimation * Animation = Zero; CATransform3D conversion; Km Pointer.lier.techpoints = cp pointmake (0, 0); [Kmpointer. Remove LayerAll Animation]; Animation = [with CABasic Animation Animation: @ "Transform"]; Transform = catariform 3dmacrotation (degree trouadian (30), 0.0 f, 0.0 f, 1.0 f); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation Setup: Value]; Transform = cateriform 3dmacrotation (0.0 F, 0.0F, 0.0F, 1.0F); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation setfavalvalue: value]; [Animation setautoorswords: no]; [Animation set duration: 1.0f]; [Change animation set count: 1]; [KmPointer.layer addAnimation: animation fork: blue];

How can I turn the pointer around a star marked with (3)?

Apple docs shows anchor point image for OSX This looks for iOS:

Then try setting your anchor point to 0.0, 1.0.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -