StroachTabBar_iOS 1.1

StroachTabBar_iOS 1.1

测试已测试
语言语言 SwiftSwift
许可 MIT
发布最新发布2017年10月
SwiftSwift 版本3.0
SPM支持 SPM

Lukas Trümper 维护。



  • Lukas Trümper

适用于 iOS 的 StroachTabBar


StroachTabBar 是一个由 Swift 编写的独特动画的现代 TabBar。它深受 BATabBarController 的启发,但其实现更为用户友好。因为 StroachTabBarController 是 UITabBarController 的子类,所以可以在不进行重大代码更改的情况下使用。

安装

StroachTabBar 通过 CocoaPods 提供。要安装它,只需在您的 Podfile 中添加以下行

use_frameworks!
pod 'StroachTabBar_iOS', '~> 1.0.2'

运行

pod install

并在您的源代码中 导入

import StroachTabBar_iOS

用法

这是一个关于如何在 Storyboard 中使用 StroachTabBarController 的说明。

  1. 将一个本机 UITabBarController 添加到 storyboard 中作为初始视图控制器,并与其视图控制器建立关系。

  2. 将 UITabBarController 的类更改为 StroachTabBarController。

    Add

  3. 在 App Delegate 中将 window.rootViewController 转换为 StroachTabBarController 的实例,并为每个连接的视图控制器添加 StroachTabBarItem。

    if let tabBarController = window?.rootViewController as? StroachTabBarController {
     let itemA = StroachTabBarItem(image: UIImage(named: "imageA")!);
     let itemB = StroachTabBarItem(image: UIImage(named: "imageB")!);
     tabBarController.stroachTabBar.items = [itemA, itemB];
    }
  4. 自定义 StroachTabBar 的外观和感觉。

    tabBarController.stroachTabBar.backgroundColor = UIColor.black;
    tabBarController.stroachTabBar.selectedColor = UIColor.orange;
    tabBarController.stroachTabBar.unselectedColor = UIColor.darkGray;

联系

如果您有任何问题,请随时发送电子邮件至 [email protected].

许可

MIT 许可证书

版权 © 2017 Lukas Trümper

特此免费授予任何人获得此软件及其相关文档文件(“软件”)副本的权利
使用软件而无需限制,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件的权利,以及允许向获得软件的人提供使用软件的权利,但受以下条件的约束
上述版权声明和本许可声明应包含在所有软件副本或主要部分中。
软件按“原样”提供,不受任何保证,明示或暗示的保证,包括但不限于适销性、对特定目的的适用性和非侵权性。在任何情况下,作者或版权持有人不对任何主张、损害或其他责任承担责任
因软件或其使用或任何其他方式造成的或与之有关的,包括但不限于合同行为、侵权行为或其他。
软件。

软件。
软件本身或与软件一起使用或销售的任何产品都未获得任何专利、版权或其他知识产权的授权。

本条适用。
条款。
不发生或与之有关的情况。
责任。
合同、侵权行为或任何其他。
与此软件或其使用或以任何其他方式有关的情况。
或交易中。