MinalTabBar 是 iOS 上对 TabBar 的一次优雅改进。MinimalTabBar 在选择后隐藏,从而让您的 UIViewControllers
保持整洁。
MinimalTabBar 有多种手势,允许独特的用户交互。最小化时,用户有三个独立的手势来控制导航。
UIViewControllers
之间切换用户实现与 Apple 的 UITabBar
非常相似。假设您的 UIViewControllers
有 UITabBar
项,只需两步。
JDMinimalTabBarController *minimalTabBarViewController = [[JDMinimalTabBarController alloc] init];
创建 MinimalTabBar 后,分配给 UIViewControllers
非常简单。使用 UITabBar
项的 name
、image
和 selectedImage
控制每个标签的外观。
[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 文件。