-
-
Notifications
You must be signed in to change notification settings - Fork 147
Loading View #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading View #21
Conversation
A loading view was added with dismiss and timeout, currently does not have the UIActivityIndicatorView
Thanks for changes! You solve many problems. I soon check it. Thanks! |
It's now possible to change the foreground color and made a small change on the initialization of the activity view let alertWithDismiss = SPAlertView(loadingMessage: "Loading...")
let alertWithTimeout = SPAlertView(loadingMessage: "Loading...", timeout: 3)
alertWithDismiss.foregroundColor = UIColor.white If no color is passed it uses the default check the |
The foregroundColor is now working properly There's now a option to blur the background of an alert or loading view, being disabled by default for the alerts and enabled by default for loading views
It's now possible to add a blur to the views under the alert. By default the blur is disabled for the alerts and enabled for the loading views let alert = SPAlertView(loadingMessage: "Loading...")
alert.blurBackground = false In case of the loading views you can disable on the initialization let alert = SPAlertView(loadingMessage: "Loading...", blurBackground: false) |
Looks very nice! waiting on this as well asap! |
As I'm also using this for an app that supports macOS Catalyst, this would give me a warning, to suppress the warning I added the following code. public var keyWindow: UIView {
if #available(iOS 13, macCatalyst 13, *) {
return UIApplication.shared.connectedScenes
.filter({$0.activationState == .foregroundActive})
.map({$0 as? UIWindowScene})
.compactMap({$0})
.first?.windows
.filter({$0.isKeyWindow}).first ?? UIWindow()
} else {
return (UIApplication.shared.keyWindow ?? UIWindow())
}
} Allowing the newest versions of iOS, and macCatalyst to work but also older versions will still work |
Hi! |
Hi,
I suggested a Loading View a few months back and you pointed me to this repo mlouli/SPAlert
I grabbed his changes but also made a few of my own
you can show a alert in a simple yet fast way
If you want using the timeout it's also possible
by default it makes the loading view as a rectangle, this is a preference of my own, but you may disable this option by
this way it will use the normal calculations.
I also updated the README.md to include this changes.
This library was tested in SwiftUI and found no errors