13.8.4
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'ProgressHUD'
|
||||
s.version = '13.8.3'
|
||||
s.version = '13.8.4'
|
||||
s.license = 'MIT'
|
||||
|
||||
s.summary = 'A lightweight and easy-to-use Progress HUD for iOS.'
|
||||
|
||||
@@ -13,7 +13,7 @@ import UIKit
|
||||
|
||||
public class ProgressHUD: UIView {
|
||||
|
||||
var main = UIApplication.shared.windows.first ?? UIWindow()
|
||||
var main: UIWindow!
|
||||
|
||||
// Banner properties
|
||||
var viewBanner: UIToolbar?
|
||||
@@ -91,7 +91,7 @@ extension ProgressHUD {
|
||||
|
||||
removeDelayTimer()
|
||||
|
||||
setupNotifications()
|
||||
setupWindow()
|
||||
setupBackground(interaction)
|
||||
setupToolbar()
|
||||
setupStatus(text)
|
||||
@@ -124,6 +124,7 @@ extension ProgressHUD {
|
||||
}
|
||||
|
||||
setupSizes(text, animation)
|
||||
setupNotifications()
|
||||
setupPosition()
|
||||
displayHUD()
|
||||
}
|
||||
@@ -170,7 +171,17 @@ extension ProgressHUD {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Background View
|
||||
// MARK: - Window
|
||||
extension ProgressHUD {
|
||||
|
||||
private func setupWindow() {
|
||||
if (main == nil) {
|
||||
main = UIApplication.shared.windows.first
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Background
|
||||
extension ProgressHUD {
|
||||
|
||||
private func removeBackground() {
|
||||
@@ -455,19 +466,17 @@ extension ProgressHUD {
|
||||
}
|
||||
}
|
||||
|
||||
private func keyboardHeight() -> CGFloat {
|
||||
if let keyboardWindowClass = NSClassFromString("UIRemoteKeyboardWindow"),
|
||||
let inputSetContainerView = NSClassFromString("UIInputSetContainerView"),
|
||||
let inputSetHostView = NSClassFromString("UIInputSetHostView") {
|
||||
|
||||
for window in UIApplication.shared.windows {
|
||||
if window.isKind(of: keyboardWindowClass) {
|
||||
for firstSubView in window.subviews {
|
||||
if firstSubView.isKind(of: inputSetContainerView) {
|
||||
for secondSubView in firstSubView.subviews {
|
||||
if secondSubView.isKind(of: inputSetHostView) {
|
||||
return secondSubView.frame.size.height
|
||||
}
|
||||
func keyboardHeight() -> CGFloat {
|
||||
let windows = UIApplication.shared.windows
|
||||
for window in windows {
|
||||
for view in window.subviews {
|
||||
if String(describing: type(of: view)).hasPrefix("UIInputSetContainerView") {
|
||||
for subview in view.subviews {
|
||||
if String(describing: type(of: subview)).hasPrefix("UIInputSetHostView") {
|
||||
let screenRect = UIScreen.main.bounds
|
||||
let keyboardRect = window.convert(subview.frame, to: nil)
|
||||
if keyboardRect.intersects(screenRect) {
|
||||
return subview.frame.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
29D29EF01D9A59E4006CA074 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 1000;
|
||||
ProvisioningStyle = Manual;
|
||||
SystemCapabilities = {
|
||||
com.apple.BackgroundModes = {
|
||||
enabled = 1;
|
||||
@@ -329,7 +328,8 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
@@ -337,7 +337,7 @@
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
|
||||
MARKETING_VERSION = 13.8.3;
|
||||
MARKETING_VERSION = 13.8.4;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.relatedcode.progresshud;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -360,14 +360,15 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
|
||||
MARKETING_VERSION = 13.8.3;
|
||||
MARKETING_VERSION = 13.8.4;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.relatedcode.progresshud;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -17,6 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
||||
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
|
||||
let viewController = ViewController(nibName: "ViewController", bundle: nil)
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
### Version: 13.8.4
|
||||
|
||||
- Corrected the window initialization issue where the `ProgressHUD` class was initialized before the 'main' window was created.
|
||||
- Resolved the keyboard height discrepancy that occurred when the keyboard was already visible before displaying the HUD.
|
||||
|
||||
### Version: 13.8.3
|
||||
|
||||
- Removed the `AlertIcon` feature. Please use the `symbol:` parameter for similar functionality.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
13.8.3
|
||||
13.8.4
|
||||
|
||||
Reference in New Issue
Block a user