mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 08:10:59 +00:00
28 lines
929 B
Swift
28 lines
929 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import UIKit
|
|
|
|
final class LoadingTableFooterView: UIView {
|
|
let activityIndicatorView = UIActivityIndicatorView()
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
|
|
addSubview(activityIndicatorView)
|
|
activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
|
activityIndicatorView.style = .large
|
|
|
|
NSLayoutConstraint.activate([
|
|
activityIndicatorView.centerXAnchor.constraint(equalTo: centerXAnchor),
|
|
activityIndicatorView.topAnchor.constraint(equalTo: layoutMarginsGuide.topAnchor),
|
|
activityIndicatorView.bottomAnchor.constraint(equalTo: layoutMarginsGuide.bottomAnchor)
|
|
])
|
|
|
|
activityIndicatorView.startAnimating()
|
|
}
|
|
|
|
@available(*, unavailable)
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
}
|