I have an objective-c question. I have an app that detects the rotation of the iOS device. I want to be able to have a timer started when the value is between two ranges. Basically if the rotation is between 0.1 and -0.1 then the timer will trigger.
I have tried while loops, for loops and I’m sure it is something simple I need to implement.
Thanks in advance for the suggestions!
-Brian
Regarding your comment, it looks like you might have the logic reversed.
You had:
If you’re looking for when the “rotation is between 0.1 and -0.1 then the timer will trigger”, then you’d want:
(I switched the order around, putting the negative on the left and the positive on the right, as that seems more logical to me, but anyway).
Or you could do: