Search code examples
iosobjective-capple-watch

Apple Watch current image position in animation


When running an animation on the apple watch I would like to set a variable to the current position of the image, say I have 10 images in an animation on the imageView and I want to know what image is currently being displayed. The output looks like the image below. How do I set that number to a variable? I am using Objective C for this project. enter image description here


Solution

  • It's not currently possible to read the state of an animation (or any other object really) on the watch. Since you know when you started the animation and you know the frame rate, you could predict where it is by measuring the elapsed time and dividing by the frame interval, but there is not any property for reading the state of the watch to know exactly where it is.