add swift version file
TransitionableTab makes it easy to animate when switching between tab .
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1+ is required to build TransitionableTab 4.2+.
To integrate TransitionableTab into your Xcode project using CocoaPods, specify it in your Podfile:
Podfile
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! target '<Your Target Name>' do pod 'TransitionableTab', '~> 0.2.0' end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update $ brew install carthage
To integrate TransitionableTab into your Xcode project using Carthage, specify it in your Cartfile:
Cartfile
github "Interactive-Studio/TransitionableTab" ~> 0.2.0
Run carthage update to build the framework and drag the built TransitionableTab.framework into your Xcode project.
carthage update
TransitionableTab.framework
If you prefer not to use either of the aforementioned dependency managers, you can integrate TransitionableTab into your project manually.
The usage of TransitionableTab is very simple
import TransitionableTab class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() self.delegate = self } } extension TabBarController: TransitionableTab { func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool { return animateTransition(tabBarController, shouldSelect: viewController) } }
public protocol TransitionableTab: UITabBarControllerDelegate { func transitionTimingFunction() -> CAMediaTimingFunction func transitionDuration() -> CFTimeInterval func fromTransitionAnimation(layer: CALayer, direction: Direction) -> CAAnimation func toTransitionAnimation(layer: CALayer, direction: Direction) -> CAAnimation }
If you want to know more detailed usage, please refer to Example.
TransitionableTab is released under the MIT license. See LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
TransitionableTab
TransitionableTab makes it easy to animate when switching between tab .
Contents
Requirements
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
To integrate TransitionableTab into your Xcode project using CocoaPods, specify it in your
Podfile
:Then, run the following command:
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
To integrate TransitionableTab into your Xcode project using Carthage, specify it in your
Cartfile
:Run
carthage update
to build the framework and drag the builtTransitionableTab.framework
into your Xcode project.Manually
If you prefer not to use either of the aforementioned dependency managers, you can integrate TransitionableTab into your project manually.
Preview
Usage
The usage of TransitionableTab is very simple
Custom
If you want to know more detailed usage, please refer to Example.
Communication
Credits
License
TransitionableTab is released under the MIT license. See LICENSE for details.