mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-03-30 23:20:27 +08:00
31 lines
685 B
Swift
31 lines
685 B
Swift
//
|
|
// EmptyLoadingView.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 4/15/18.
|
|
// Copyright © 2018 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
final class EmptyLoadingView: UIView {
|
|
|
|
private let activity = UIActivityIndicatorView(activityIndicatorStyle: .gray)
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
activity.startAnimating()
|
|
addSubview(activity)
|
|
}
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
override func layoutSubviews() {
|
|
super.layoutSubviews()
|
|
activity.center = CGPoint(x: bounds.width/2, y: bounds.height/2)
|
|
}
|
|
|
|
}
|