测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2016年12月 |
SwiftSwift 版本 | 3.0-GM-CANDIDATE |
SPM支持 SPM | ✗ |
由 MM 维护。
iOS 8.0+
Xcode 8.0+
Swift 3.0+
1. Inherit MMTabBarAnimation on your TabBarController
class BaseTabBarViewController: MMTabBarAnimateController {
}
2. Set function
// Default duration = 0.3
public func setAnimateAllItem(animate: MMTabBarAnimation.ItemAnimateType, duration: TimeInterval)
public func setAnimateAllItem(animate: MMTabBarAnimation.ItemAnimateType)
public func setAnimate(index: Int, animate: MMTabBarAnimation.ItemAnimateType, duration: TimeInterval)
public func setAnimate(index: Int, animate: MMTabBarAnimation.ItemAnimateType)
public func setBadgeAnimate(index: Int, animate: MMTabBarAnimation.AnimateType)
public func setAllBadgeAnimate(animate: MMTabBarAnimation.AnimateType)
3. Choose Animation Type
public enum AnimateType {
case scale(rate: Float)
case jump
case rotation(type: MMTabBarAnimation.RotationType) // .left .right .circle
case shake
case none // Disable Animation
}
4. Choose Animation on which item
public enum ItemAnimateType {
case content(type: MMTabBarAnimation.AnimateType) // tabBarView
case icon(type: MMTabBarAnimation.AnimateType) // tabBarIcon
case label(type: MMTabBarAnimation.AnimateType) // tabBarTitleLabel
case iconExpand(image: UIImage) // Expand Select Image with Animation (Dont Set selectImage on storyBoard)
}
要运行示例项目,首先 克隆 仓库,然后 从 Example 目录运行 pod install
。
MMTabBarAnimation 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile
pod 'MMTabBarAnimation'
杨 Millman, [email protected]
MMTabBarAnimation 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。