//
|
// Def.swift
|
// BrokerDriver
|
//
|
// Created by 无故事王国 on 2023/4/24.
|
//
|
|
import Foundation
|
import UIKit
|
@_exported import JQTools
|
@_exported import QMUIKit
|
|
// MARK: -- Shorthand
|
let app = UIApplication.shared.delegate as! AppDelegate
|
|
var screnDelegate:SceneDelegate? = {
|
var uiScreen:UIScene?
|
UIApplication.shared.connectedScenes.forEach { scenes in
|
uiScreen = scenes
|
}
|
return (uiScreen?.delegate as? SceneDelegate)
|
}()
|
|
var topSafeHeight:Double{
|
return JQ_currentNavigationController().navigationBar.frame.height + UIApplication.shared.statusBarFrame.height
|
}
|
|
|
let notiCenter = NotificationCenter.default
|
|
func LogSuccess(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
|
#if DEBUG
|
let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
|
print("✅✅✅ SUCCESS: \(file) \(function) [Line: \(line)]: \(items)",separator);
|
#endif
|
}
|
|
func LogError(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
|
#if DEBUG
|
let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
|
print("❌❌❌ ERROR: \(file) \(function) [Line: \(line)]: \(items)",separator);
|
#endif
|
}
|
|
func LogInfo(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
|
#if DEBUG
|
let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
|
print("⚠️⚠️⚠️INFO: \(file) \(function) [Line: \(line)]: \(items)",separator);
|
#endif
|
}
|
|
|
// MARK: -- Front
|
let Def_NavFont:UIFont = UIFont.systemFont(ofSize: 19, weight: .bold)
|
|
|
// MARK: -- Color
|
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"))
|