25 lines
553 B
Swift
25 lines
553 B
Swift
//
|
|
// SPToast.swift
|
|
// ShortPlay
|
|
//
|
|
// Created by 曾觉新 on 2025/4/9.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class SPToast: NSObject {
|
|
|
|
static func config() {
|
|
CSToastManager.setTapToDismissEnabled(false)
|
|
CSToastManager.setDefaultDuration(2)
|
|
CSToastManager.setDefaultPosition(CSToastPositionCenter)
|
|
}
|
|
|
|
static func show(text: String?) {
|
|
guard let text = text else { return }
|
|
// SPAPPTool.getKeyWindow()?.makeToast(text, duration: 2, position: nil)
|
|
SPAPPTool.getKeyWindow()?.makeToast(text)
|
|
}
|
|
|
|
}
|