Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ramotion/animated-tab-bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
https://github.com/Ramotion/animated-tab-bar
animation ios library material-design swift ui
Last synced: 3 months ago
JSON representation
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
- Host: GitHub
- URL: https://github.com/Ramotion/animated-tab-bar
- Owner: Ramotion
- License: mit
- Created: 2014-11-11T11:20:04.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-26T02:40:50.000Z (almost 3 years ago)
- Last Synced: 2024-04-23T23:54:53.302Z (6 months ago)
- Topics: animation, ios, library, material-design, swift, ui
- Language: Swift
- Homepage: https://www.ramotion.com/animated-tab-bar-ios-app-development-ui-library/
- Size: 9.22 MB
- Stars: 11,109
- Watchers: 318
- Forks: 1,329
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - animated-tab-bar - RAMAnimatedTabBarController is a Swift module for adding animation to tabbar items. (UI / Tab Bar)
- awesome-swift - Animated Tab Bar - RAMAnimatedTabBarController is a module for adding animation to tab bar items. (Libs / UI)
- awesome-cocoa - animated-tab-bar
- awesome-ios-animation - animated-tab-bar - RAMAnimatedTabBarController is a Swift module for adding animation to tabbar items. (Uncategorized / Uncategorized)
- awesome-swift - Animated Tab Bar - RAMAnimatedTabBarController is a module for adding animation to tab bar items. (Libs / UI)
- awesome-ios-star - animated-tab-bar - RAMAnimatedTabBarController is a Swift module for adding animation to tabbar items. (UI / Tab Bar)
- awesome-neuron - Animated Tab Bar
- fucking-awesome-swift - Animated Tab Bar - RAMAnimatedTabBarController is a module for adding animation to tab bar items. (Libs / UI)
- awesome-ios - animated-tab-bar - RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library. [•](https://raw.githubusercontent.com/Ramotion/animated-tab-bar/master/Screenshots/animatedTabBar.gif) (Content / Tab Bar)
- awesome-swift - Animated Tab Bar - RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion ` 📝 a year ago` (UI [🔝](#readme))
README
ANIMATED TAB BAR
Swift UI module library for adding animation to iOS tabbar items and icons.
___
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
Stay tuned for the latest updates:
[![CocoaPods](https://img.shields.io/cocoapods/p/RAMAnimatedTabBarController.svg)](http://cocoapods.org/pods/RAMAnimatedTabBarController)
[![CocoaPods](https://img.shields.io/cocoapods/v/RAMAnimatedTabBarController.svg)](http://cocoapods.org/pods/RAMAnimatedTabBarController)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/animated-tab-bar)
[![Swift 4.0](https://img.shields.io/badge/Swift-5.0-green.svg?style=flat)](https://developer.apple.com/swift/)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Ramotion)
[![Travis](https://img.shields.io/travis/Ramotion/animated-tab-bar.svg)](https://travis-ci.org/Ramotion/animated-tab-bar)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)## Requirements
- iOS 9.0+
- Xcode 10.2## Installation
Just add the RAMAnimatedTabBarController folder to your project.
or use [CocoaPods](https://cocoapods.org) with Podfile:
``` ruby
pod 'RAMAnimatedTabBarController'
```or [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:
```
github "Ramotion/animated-tab-bar"
```or [Swift Package Manager](https://swift.org/package-manager/)
## 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](http://vimeo.com/112390386)## Included Animations
* RAMBounceAnimation
* RAMLeftRotationAnimation
* RAMRightRotationAnimation
* RAMFlipLeftTransitionItemAnimations
* RAMFlipRightTransitionItemAnimations
* RAMFlipTopTransitionItemAnimations
* RAMFlipBottomTransitionItemAnimations
* RAMFrameItemAnimation
* RAMFumeAnimation## Creating Custom Animations
1. Create a new class which inherits from RAMItemAnimation:``` swift
class NewAnimation : RAMItemAnimation
```
2. Implement the methods in RAMItemAnimationProtocol:``` swift
// method call when Tab Bar Item is selected
override func playAnimation(icon: UIImageView, textLabel: UILabel) {
// add animation
}
```
``` swift
// method call when Tab Bar Item is deselected
override func deselectAnimation(icon: UIImageView, textLabel: UILabel, defaultTextColor: UIColor, defaultIconColor: UIColor) {
// add animation
}
```
``` swift
// method call when TabBarController did load
override func selectedState(icon: UIImageView, textLabel: UILabel) {
// set selected state
}
```3. Example:
``` swift
import RAMAnimatedTabBarControllerclass 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 = kCAAnimationCubicicon.layer.add(bounceAnimation, forKey: "bounceAnimation")
}
}
```## 📄 License
Animated Tab Bar is released under the MIT license.
See [LICENSE](./LICENSE) for details.This library is a part of a selection of our best UI open-source projects.
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
## 📱 Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.