I’m starting to program in IOS with Xcode, my idea is to carry a watch with hands that mark the altitude according to the GPS data received from the Iphone. I have the variable that returns me the height in meters, how do I do that to interpret it clockwise?
Share
Set the view.transform property based on the distance.
You’ll need to convert the distance into radians. Here’s some code
If it’s turning the wrong way, use -angle in the transform instead. If it’s off by 1/4 of a circle, subtract M_PI_2 from the angle.
For your watch hand to look right, the centre of the hand image will need to be in the centre of the imageView, so you may need to leave a lot of empty white-space in the image, but don’t worry it won’t affect performance significantly.