3

I have configured Core Motion manager in order to access the rotation coordinates and use them to animate deviation, like in native compass application. So here is what I want to achieve:

Green curve

It is this green line showing the deviation. I've tried simply to animate bezier's curve by setting it in

manager.startDeviceMotionUpdates(to: OperationQueue.current!, withHandler:)

method, but it didn't work - the animation was starting each time coordiantes was changing and filling the center with lines. I suppose that this animation should run on different thread, and motion manager should update only end point of bezier's curve. I have no idea how to do it. Any tips or examples would be appreciated!

0 Answers0