enter image description hereI am working on an iOS project in Swift where I have a body image with muscles displayed using a UIImageView. I want to implement a blinking effect on a specific muscle when it’s tapped.
Can anyone suggest a more advanced and visually appealing solution or provide recommendations on libraries or techniques to implement a smooth blinking effect on a muscle image when it’s tapped in a Swift iOS project?
I am attaching a simplified image to explain my goal.
I have a UIImageView named muscleImageView which displays a body image with muscles.
I’ve added a tap gesture recognizer to muscleImageView.
The handleTap function is called on a tap, and it invokes the blinkMuscle function to create a blinking effect by changing the alpha property.
While the above code creates a basic blinking effect, it doesn’t feel Work. I’m looking for a more sophisticated solution to achieve a smooth and visually pleasing blinking effect on the muscle image.




