//
//  SpeakPacticeFailTipViewCtr.swift
//  SpeakEasyLearnEnglish
//
//  Created by edy on 2025/8/1.
//

import UIKit

class SpeakPacticeFailTipViewCtr: UIViewController {

    @IBOutlet weak var contentV: UIView!
    
    @IBOutlet weak var SpeakBottomConst: NSLayoutConstraint!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        SpeakBottomConst.constant = -Dev.screenH
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.view.setNeedsDisplay()
        DispatchQueue.main.async {
            self.SpeakBottomConst.constant = 0
            UIView.animate(withDuration: 0.25) {
                self.view.layoutIfNeeded()
            }
        }
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        self.view.layoutIfNeeded()
        contentV.cornerRect(radius: 16, [.topLeft,.topRight])
    }
    
    @IBAction func SpeakSureTaps(_ sender: Any) {
        self.dismiss(animated: true)
    }
}
