public class LoadingView: UIView {
private var applicationDidBecomeActiveObserver: NSObjectProtocol?
private let notificationCenter: NotificationCenter
private let style: LoadingView.Style
private lazy var imageView: UIImageView = {
let imageView = UIImageView(image: #imageLiteral(resourceName: "common_loading_spinner.pdf"))
imageView.tintColor = style.tintColor
return imageView
}()
public init(notificationCenter: NotificationCenter = .default,
style: LoadingView.Style = .someStyle) {
self.notificationCenter = notificationCenter
self.style = style
super.init(frame: .zero)
load()
makeConstraints()
}
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
public override func didMoveToSuperview() {
super.didMoveToSuperview()
startAnimating()
}
public func forceBeginLoading() {
startAnimating()
}
private func startAnimating() {
}
}