metatext-app-ios-iphone-ipad/Views/LoadingTableFooterView.swift

28 lines
884 B
Swift
Raw Normal View History

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