UITabBarController with animated items.
- iOS 7.0+
- Xcode 6.1
Just add RAMAnimatedTabBarController folder to your project.
-
Set the class of the UITabBarController to RAMAnimatedTabBarController in your Storyboard or nib.
-
For each UITabBarItems set the class RAMAnimatedTabBarItem in your Storyboard or nib.
-
Add custom image icon for each TabBarItems
-
Add animation for each TabBarItems :
- drag and drop NSObject to item UIViewController
- set the class of the NSObject to ANIMATION_CLASS
- connect outlet animation in RAMAnimatedTabBarItem with ANIMATION_CLASS video for step 4
- RAMBounceAnimation
- RAMLeftRotationAnimation
- RAMRightRotationAnimation
- RAMFlipLeftTransitionItemAniamtions
- RAMFlipRightTransitionItemAniamtions
- RAMFlipTopTransitionItemAniamtions
- RAMFlipBottomTransitionItemAniamtions
- RAMFrameItemAnimation
-
Create new class and inherit RAMItemAnimation class
class NewAnimation : RAMItemAnimation
2. Override methods:
``` swift
// method call when Tab Bar Item is selected
override func playAnimation(icon : UIImageView, textLable : UILabel) {
// add animation
}
// method call when Tab Bar Item is deselected
override func deselectAnimation(icon : UIImageView, textLable : UILabel, defaultTextColor : UIColor) {
// add animation
}
// method call when TabBarController did load
override func selectedState(icon : UIImageView, textLable : UILabel) {
// set selected state
}
##About us
Ramotion is an iPhone app design and development company. We are ready for new interesting iOS App Development projects.
Follow us on twitter.