animated-tab-bar 0,4,5,0,7,0,11,0 travis-ci CocoaPods

RAMAnimatedTabBarController is a Swift module for adding animation to tabbar items.

header

RAMAnimatedTabBarController

CocoaPods CocoaPods CocoaPods Carthage compatible Twitter Travis

About

This project is maintained by Ramotion, Inc.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Looking for developers for your project?

Animation

The iPhone mockup available here.

Try this UI control in action

Screencast from our Demo

Animation

Requirements

  • iOS 9.0+
  • xCode 8

Installation

Just add the RAMAnimatedTabBarController folder to your project.

or use CocoaPods with Podfile:

pod 'RAMAnimatedTabBarController', "~> 1.5.3"  swift 2.2
pod 'RAMAnimatedTabBarController', "~> 2.0.13"  swift 3

or Carthage users can simply add to their Cartfile:

github "Ramotion/animated-tab-bar"

Usage

  1. Create a new UITabBarController in your storyboard or nib.

  2. Set the class of the UITabBarController to RAMAnimatedTabBarController in your Storyboard or nib.

  3. For each UITabBarItem, set the class to RAMAnimatedTabBarItem.

  4. Add a custom image icon for each RAMAnimatedTabBarItem

  5. 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

Included Animations

  • RAMBounceAnimation
  • RAMLeftRotationAnimation
  • RAMRightRotationAnimation
  • RAMFlipLeftTransitionItemAnimations
  • RAMFlipRightTransitionItemAnimations
  • RAMFlipTopTransitionItemAnimations
  • RAMFlipBottomTransitionItemAnimations
  • RAMFrameItemAnimation
  • RAMFumeAnimation

Creating Custom Animations

  1. Create a new class which inherits from RAMItemAnimation:

     class NewAnimation : RAMItemAnimation
  2. Implement the methods in RAMItemAnimationProtocol:

    // method call when Tab Bar Item is selected
    override func playAnimation(icon: UIImageView, textLabel: UILabel) {
      // add animation
    }
    // method call when Tab Bar Item is deselected
    override func deselectAnimation(icon: UIImageView, textLabel: UILabel, defaultTextColor: UIColor, defaultIconColor: UIColor) {
      // add animation
    }
    // method call when TabBarController did load
    override func selectedState(icon: UIImageView, textLabel: UILabel) {
      // set selected state  
    }
  3. Example:

import RAMAnimatedTabBarController

class RAMBounceAnimation : RAMItemAnimation {

    override func playAnimation(_ icon: UIImageView, textLabel: UILabel) {
        playBounceAnimation(icon)
        textLabel.textColor = textSelectedColor
    }

    override func deselectAnimation(_ icon: UIImageView, textLabel: UILabel, defaultTextColor: UIColor, defaultIconColor: UIColor) {
        textLabel.textColor = defaultTextColor
    }

    override func selectedState(_ icon: UIImageView, textLabel: UILabel) {
        textLabel.textColor = textSelectedColor
    }

    func playBounceAnimation(_ icon : UIImageView) {

        let bounceAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
        bounceAnimation.values = [1.0 ,1.4, 0.9, 1.15, 0.95, 1.02, 1.0]
        bounceAnimation.duration = TimeInterval(duration)
        bounceAnimation.calculationMode = kCAAnimationCubic

        icon.layer.add(bounceAnimation, forKey: "bounceAnimation")
    }
}

Follow us

Twitter URL Twitter Follow

Related Repositories

react-native-scrollable-tab-view

react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollV ...

animated-tab-bar-Objective-C

animated-tab-bar-Objective-C

PJXAnimatedTabBarController is a Objective-C version of RAMAnimatedTabBarControl ...

MCSMTabBarKit

MCSMTabBarKit

A Custom Tab Bar for iOS ...

AKTabBarController

AKTabBarController

Adaptative and customizable tab bar for iOS. ...

MaterialesqueTabBar

MaterialesqueTabBar

A material-style animated top tab bar for iOS. ...


Top Contributors

ober01 aleksei1000000 Juriv devladinci Pakhaliuk naoyashiga okipol88 kirualex thinkclay XBeg9 efremidze eneko BenchR267 jfcartkeep minuscorp MehdiSv MichaelCampbell rafalwojcik RamotionRussell tfrank64 alostsega kirankunigiri liberty4me strivingboy polobymulberry

Releases

-   2.0.1 zip tar
-   2.0.0 zip tar
-   1.5.3 zip tar
-   1.5.2 zip tar
-   1.5.1 zip tar
-   1.5.0 zip tar
-   1.4.2 zip tar
-   1.4.1 zip tar
-   1.4.0 zip tar
-   1.3.1 zip tar
-   1.3.0 zip tar
-   1.2.2 zip tar
-   1.2.1 zip tar
-   1.2.0 zip tar
-   1.1.1 zip tar
-   1.1 zip tar
-   1.0.9 zip tar
-   1.0.8 zip tar
-   1.0.7 zip tar
-   1.0.6 zip tar
-   1.0.5 zip tar
-   1.0.4 zip tar
-   1.0.3 zip tar
-   1.0.2 zip tar
-   1.0.1 zip tar