younger_times
2023-04-26 945655d9f53293d7da9d2d11363b3230f6e53bbe
BrokerDriver/Def.swift
@@ -7,8 +7,12 @@
import Foundation
import UIKit
import MBProgressHUD
@_exported import JQTools
@_exported import QMUIKit
@_exported import HandyJSON
@_exported import RxSwift
    // MARK: -- Shorthand
let app = UIApplication.shared.delegate as! AppDelegate
@@ -58,3 +62,37 @@
let Def_NavFontColor:UIColor = .color(light: .color("#333333"), dark: .color("#333333"))
let Def_backgroundColor:UIColor = .color(light: .white, dark: .white)
let Def_ThemeColor:UIColor = .color(light: .color("#FED703"), dark: .color("#FED703"))
    //提示框
func alert(msg: String) {
    let hud = MBProgressHUD.showAdded(to: screnDelegate!.window!, animated: true)
    hud.mode = .text
    hud.label.text = msg
        //    hud.backgroundColor = UIColor.RGBA(r: 228, g: 228, b: 228, a: 1)
    hud.label.textColor = UIColor(hexString: "#343434")
    hud.label.numberOfLines = 0
    hud.label.font = UIFont.boldSystemFont(ofSize: 14)
    hud.hide(animated: true, afterDelay: 1.7)
}
//extension UICollectionView{
//    public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_empty"),foregroundColor:UIColor = UIColor.gray,clouse:((EmptyDataSetView)->Void)? = nil) {
//        self.emptyDataSetView { (emptyDataSetView) in
//            emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : Localized("暂无数据"), attributes: [.font:UIFont.systemFont(ofSize: 16,weight: .medium), .foregroundColor:foregroundColor as Any]))
//                .image(image)
//                .dataSetBackgroundColor(UIColor.white)
//                .verticalOffset(-50)
//                .verticalSpace(0)
//                .shouldDisplay(true)
//                .shouldFadeIn(true)
//                .isTouchAllowed(true)
//                .isScrollAllowed(true)
//                .didTapContentView {
//
//                }
//            clouse?(emptyDataSetView)
//        }
//    }
//}