0

The current iOS LinkedIn app's UITabBar fills up the UITabBarItem image on selection. The filling up of the UITabBarItem image is animated. How can I replicate that animation using Swift?

Initially when not selected the image just has an outline with no fill. On selection the image fills up from the middle (animated) with a color leading to filled image.

1 Answers1

0

I think you can easily achieve this by using the UIImageView's highlightedAnimationImages along with an animationRepeatCount = 0

If you don't want to have many images instead of only 1, you can subclass UIImageView and animate an additional colored mask layer when highlighted.

You can also look for frameworks like Lottie to use animations

Imotep
  • 2,006
  • 2
  • 25
  • 38