ios - Rotate view from anchor swift -


in application, calculating bmi of user based on height , weight. based on bmi value animating needle. issue needle moves off center , rotates.

code:

ivpointer.layer.anchorpoint = cgpoint(x: 0, y: 0.5)  // have changed values still not working let angle = double((value * double.pi)/180) var transform = cgaffinetransform.identity.rotated(by: cgfloat(angle)) 


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -