为TabBar项目添加动画:RAMAnimatedTabBarController
jopen
10年前
RAMAnimatedTabBarController是一个Swift模块,用于为为TabBar项目添加动画。它有预先设定的好的动画,但也可以自定义你想要的任何动画的能力。效果如下:
用法:
-
Create a new UITabBarController in your storyboard or nib.
-
Set the class of the UITabBarController to RAMAnimatedTabBarController in your Storyboard or nib.
-
For each UITabBarItem, set the class to RAMAnimatedTabBarItem.
-
Add a custom image icon for each RAMAnimatedTabBarItem
-
Add animation for each RAMAnimatedTabBarItem :
- drag and drop an NSObject item into your ViewController
- set its class to ANIMATION_CLASS (where ANIMATION_CLASS is the class name of the animation you want to use)
- connect the outlet animation in RAMAnimatedTabBarItem to your ANIMATION_CLASS Demonstration video for step 5