metatext/Views/UIKit/LoadingTableFooterView.swift

29 lines
929 B
Swift
Raw Normal View History

2020-08-28 22:39:17 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import UIKit
2020-09-08 02:35:28 +00:00
final class LoadingTableFooterView: UIView {
2020-08-28 22:39:17 +00:00
let activityIndicatorView = UIActivityIndicatorView()
override init(frame: CGRect) {
super.init(frame: frame)
addSubview(activityIndicatorView)
activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
2021-01-16 20:06:35 +00:00
activityIndicatorView.style = .large
2020-09-29 01:32:28 +00:00
NSLayoutConstraint.activate([
activityIndicatorView.centerXAnchor.constraint(equalTo: centerXAnchor),
activityIndicatorView.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor),
activityIndicatorView.bottomAnchor.constraint(equalTo: layoutMarginsGuide.bottomAnchor)
])
2020-08-28 22:39:17 +00:00
activityIndicatorView.startAnimating()
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}