//
|
// StudentUpdateInfoView.swift
|
// WanPai
|
//
|
// Created by 杨锴 on 2023/6/14.
|
//
|
|
import UIKit
|
import JQTools
|
|
class StudentUpdateInfoView: UIView,JQNibView{
|
|
@IBOutlet weak var view_container: UIView!
|
@IBOutlet weak var cons_bottom: NSLayoutConstraint!
|
|
override func awakeFromNib() {
|
super.awakeFromNib()
|
cons_bottom.constant = -(JQ_ScreenW / 2)
|
alpha = 0
|
layoutIfNeeded()
|
}
|
|
static func show(){
|
let storesView = StudentUpdateInfoView.jq_loadNibView()
|
storesView.frame = screnDelegate?.window?.frame ?? .zero
|
screnDelegate?.window?.addSubview(storesView)
|
storesView.cons_bottom.constant = 0
|
|
UIView.animate(withDuration: 0.4) {
|
storesView.alpha = 1
|
storesView.layoutIfNeeded()
|
}
|
}
|
|
private func close(){
|
self.cons_bottom.constant = -(JQ_ScreenW / 2)
|
UIView.animate(withDuration: 0.4) {
|
self.alpha = 0
|
self.layoutIfNeeded()
|
} completion: { _ in
|
self.removeFromSuperview()
|
}
|
}
|
}
|