RainbowBar
带疯狂动画的不带边框的状态栏进度条。自动调整大小(高度和边框曲线)以匹配设备型号。由 SwiftUI 和 Combine 驱动。纯粹为了好玩和 SwiftUI 练习而制作。灵感来自 https://dribbble.com/shots/3824870-Loading-Animation-for-iPhone-X
安装
CocoaPods
要将 RainbowBar
集成到您的项目中,请将以下代码添加到您的 Podfile
platform :ios, '13.0'
use_frameworks!
pod 'RainbowBar'
用法
import SwiftUI
import Combine
import RainbowBar
var animatedSignal = PassthroughSubject<Bool, Never>()
RainbowBar(waveEmitPeriod: 0.3,
visibleWavesCount: 3,
waveColors: [.red, .green, .blue],
backgroundColor: .white,
animated: animatedSignal)
animatedSignal.send(true)