CBTabBarController 0.9.5

CBTabBarController 0.9.5

Anton Skopin维护。



CBTabBarController

GitHub license CocoaPods Carthage compatible Swift 4.0

Animation

示例

要运行示例项目,请克隆仓库,并从 CBTabBar.xcodeproj 运行ExampleApp方案

需求

  • iOS 10.0+
  • Xcode 9

安装

CocoaPods

要安装 CBTabBarController,请将以下行添加到您的 Podfile 中

pod 'CBTabBarController'

然后运行 pod install

Carthage

在您的 Cartfile 中添加以下条目

github "Cuberto/cb-tabbar"

然后运行 carthage update

如果您首次在该项目中使用 Carthage,您需要按照 Carthage 中的说明进行一些额外的步骤。详见 Carthage

手册

将 CBTabBarController 文件夹添加到您的项目中

用法

带有 Storyboard

  1. 在 Storyboard 或 nib 中创建一个新的 UITabBarController。

  2. 在 Storyboard 或 nib 中将 UITabBarController 的类设置为 CBTabBarController

  3. 为每个子控制器添加自定义图像图标和标题

不使用 Storyboard

  1. 导入 CBTabBarController
  2. 实例化 CBTabBarController
  3. 添加一些子控制器,并且别忘了为它们设置带标题和图像的 tabBar 项

风格

使用 CBTabbarController 实例的 style 属性设置合适的 tabBar 风格。您可以子类化 UITabBarItem 并遵守 CBExtendedTabItem 协议以定义自定义标题样式和按钮的 tint。

当前支持的样式

带菜单的 Gooey 风格

Animation

需要配置的 CBTabMenu 实例作为参数(见示例)。任何遵守 CBTabMenuItem 的对象都可以用作菜单项

闪亮

Animation

渐隐(默认)

与粘性相同,但没有菜单按钮

作者

Cuberto Design,[email protected]

许可证

CB TabBarController 在 MIT 许可证下可用。更多信息请参阅 LICENSE 文件。