Name: NMAnimatedTabBarItem
Owner: Namshi
Description: A UI library to Animate UITabBar Items
Created: 2018-03-20 07:11:01.0
Updated: 2018-04-17 08:47:11.0
Pushed: 2018-03-21 10:34:57.0
Homepage: null
Size: 423
Language: Swift
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
NMAnimatedTabBarItem is a Swift based UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Namshi Mobile Team.
Just add the NMAnimatedTabBarItem folder to your project. or use CocoaPods with Podfile:
'NMAnimatedTabBarItem'
Import NMAnimateTabBarItem framework.
rt NMAnimatedTabBarItem
Create an instance of type NMAnimateTabBarItem.
animatedTabBar = NMAnimateTabBarItem()
Adopt UITabBarControllerDelegate into your class.
s ViewController: UITabBarController , UITabBarControllerDelegate {
Your stuff
Implement UITabBarControllerDelegate method.
tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
rn true
Find the index of selected tab and call animateTabBarItem.
indexOfTab = tabBarController.viewControllers?.index(of:viewController)
atedTabBar.animateTabBarItem(self.tabBar, indexOfTab!, NMAnimationtype.Bounce)
Make sure UITabBar item images are added.
atedTabBar.duration = 0.2
atedTabBar.transitionOptions = UIViewAnimationOptions.transitionFlipFromBottom
atedTabBar.direction = NMRotationDirection.right
ationType = NMAnimationtype.Frame
imagesArray :[String] = []
index in 0...35 {
esArray.append("frame_\(index)")
atedTabBar.createImagesArray(imagesArray)
ationType = NMAnimationtype.Frame
esList.append((UIImage(named: "image.png")?.cgImage)!)
esList.append((UIImage(named: "image2.png")?.cgImage)!)
esList.append((UIImage(named: "image3.png")?.cgImage)!)
atedTabBar.animationImages = imagesList
You can download the latest files from our Releases page. After doing so, copy the Swift file in the Sources folder to your project.
Check out the Example project.
This library has created by inspiration of RAMAnimatedTabBarController.
All right reserved. Namshi Team 2018.