This commit is contained in:
DDIsFriend
2023-08-18 17:28:57 +08:00
commit f0e8a1709d
4282 changed files with 192396 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
//
// EKAttributes+WindowLevel.swift
// SwiftEntryKit
//
// Created by Daniel Huri on 4/21/18.
// Copyright (c) 2018 huri000@gmail.com. All rights reserved.
//
import UIKit
public extension EKAttributes {
/** Describes the window level in which the entry would be displayed */
enum WindowLevel {
/** Above the alerts */
case alerts
/** Above the status bar */
case statusBar
/** Above the application window */
case normal
/** Custom level */
case custom(level: UIWindow.Level)
/** Returns the raw value - the window level itself */
public var value: UIWindow.Level {
switch self {
case .alerts:
return .alert
case .statusBar:
return .statusBar
case .normal:
return .normal
case .custom(level: let level):
return level
}
}
}
}