//
|
// ActivityView.swift
|
// WashCar
|
//
|
// Created by alvin_y on 2020/7/9.
|
// Copyright © 2020 yangwang. All rights reserved.
|
//
|
|
import Foundation
|
import UIKit
|
class ActivityView: UIView {
|
|
let activityIndicator = UIActivityIndicatorView()
|
|
init(color: UIColor) {
|
super.init(frame: .zero)
|
|
activityIndicator.center = center
|
activityIndicator.style = .whiteLarge
|
activityIndicator.startAnimating()
|
activityIndicator.color = color
|
addSubview(activityIndicator)
|
|
activityIndicator.snp.makeConstraints { (make) in
|
make.center.equalTo(self)
|
}
|
}
|
|
required init?(coder aDecoder: NSCoder) {
|
fatalError("init(coder:) has not been implemented")
|
}
|
}
|