//
//  ExtensionVCToastAlert.swift
//  WOKA
//
//  Created by MacBook Pro on 06/05/24.
//

import UIKit

extension UIViewController{
    
    func toast(msg : String , time : CGFloat, completionBlock: (() -> ())? = nil){
        self.view.endEditing(true)
        self.view.isUserInteractionEnabled = false
        self.view.makeToast(msg, duration: time, point: CGPoint(x: self.view.frame.width / 2, y:  self.view.frame.height - 60), title: nil, image: nil, completion: {didTap in
            self.view.isUserInteractionEnabled = true
            completionBlock?()
        })
    }
}
