测试已测试 | ✗ |
Lang语言 | SwiftSwift |
许可证 | MIT |
Released最新发布 | 2017年11月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✗ |
由 PandaApe 维护。
CocoaPods(推荐)
HLBarIndicatorView 通过 CocoaPods 提供。要安装
它,只需将以下行添加到您的 podfile 中
platform :ios, '8.0'
use_frameworks!
pod "HLBarIndicatorView"
为了获取全部好处,在任何の場所导入 UIKit 时导入 HLBarIndicatorView
import UIKit
import HLBarIndicatorView
手动
HLBarIndicatorView.swift
拖放到您的项目中。纯代码初始化:
let indicatorView = HLBarIndicatorView(frame: CGRect(x: 0, y: 40, width: UIScreen.main.bounds.width, height: 80))
indicatorView.indicatorType = .barScaleFromRight
self.view.addSubview(indicatorView)
HLBarIndicatorView 也支持从 Xib
加载
属性 | 默认值 | 备注 |
---|---|---|
open var barsCount:Int | 5 | bar 的数量,必须是奇数 |
open var indicatorType: HLBarIndicatorType | HLBarIndicatorType.barScalePulseOut | 提供 3 种样式 |
open var maxBarHeight: CGFloat | 40.0 | 最大高度 |
open var minBarHeight: CGFloat | 10.0 | 最小高度 |
open var barWidth: CGFloat | 5.0 | Bar 的宽度 |
open var barsGapWidth: CGFloat | 3.0 | bar 之间的间隔 |
open var barCornerRadius: CGFloat | 5.0 | 圆角 |
open var animationDuration: CFTimeInterval | 0.8 | 执行一次动画所需的时间 |
open var barColor: UIColor | UIColor.white | Bar 的颜色 |
case .barScalePulseOut
case .barScaleFromRight
case .barScaleFromLeft
open func startAnimating()
open func pauseAnimating()
pandaApe, [email protected]
HLBarIndicatorView 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。