MinimalTabBar 0.1.1

MinimalTabBar 0.1.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2014年12月

James Dunay维护。



MinalTabBar 是 iOS 上对 TabBar 的一次优雅改进。MinimalTabBar 在选择后隐藏,从而让您的 UIViewControllers 保持整洁。

手势

MinimalTabBar 有多种手势,允许独特的用户交互。最小化时,用户有三个独立的手势来控制导航。

  • 点击 打开 MinimalTabBar
  • 滑动 会在相邻的 UIViewControllers 之间切换用户
  • 长按 会让用户完整查看应用程序

实现

实现与 Apple 的 UITabBar 非常相似。假设您的 UIViewControllersUITabBar 项,只需两步。

JDMinimalTabBarController *minimalTabBarViewController = [[JDMinimalTabBarController alloc] init];

创建 MinimalTabBar 后,分配给 UIViewControllers 非常简单。使用 UITabBar 项的 nameimageselectedImage 控制每个标签的外观。

[minimalTabBarViewController setViewControllers:@[sectionOneVC, sectionTwoVC, sectionThreeVC, sectionFourVC, sectionFiveVC]];

MinimalTabBarController 的 MinimalBar 可以设置以下属性:

  • @property (nonatomic, strong) UIColor* defaultTintColor;
  • @property (nonatomic, strong) UIColor* selectedTintColor;
  • @property (nonatomic) BOOL showTitles;
  • @property (nonatomic) BOOL hidesTitlesWhenSelected;

您还可以为 MinimalBar 提供背景颜色(如果需要)

注意

如果您有任何评论或遇到错误,请告诉我,因为我经常进行更改。

用法

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

安装

作者

jamesdunay [at] gmail

许可证

MinimalTabBar 提供 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。