- 代码:
import Foundation
import UIKit
enum Toast {
static func toast(at view: UIView, message: String, completion: (() -> Void)? = nil) {
let toastLabel = MGSLabel(frame: .zero)
toastLabel.text = " \(message) "
toastLabel.numberOfLines = 0
toastLabel.font = UIFont.systemFont(ofSize