Type | Requirement | |
---|---|---|
Platform |
iOS |
8.0+ |
macOS |
N/A |
|
tvOS |
N/A |
|
watchOS |
N/A |
|
Linux |
N/A |
|
IDE |
Xcode |
10.2+ |
Language |
Swift |
5+ |
BlurHUD
is open-sourced software, licensed under the MIT
license.
import BlurHUD
BlurHUD.show(.error)
BlurHUD.hide(afterDelay: 2.0)
import BlurHUD
BlurHUD.flash(.success, delay: 2.0)
import BlurHUD
let image = ...
BlurHUD.flash(.rotatingImage(image), delay: 2.0)
import BlurHUD
BlurHUD.flash(.label("Requesting from the server..."), delay: 2.0) { _ in
BlurHUD.flash(.labeledSuccess(title: nil, subtitle: "Obtained"), delay: 2.0)
}
Please note that the above demonstrates the "porcelain" interface - a more concise and clean way to work with the BlurHUD
.
If you need more options and flexbility, feel free to use the underlying "plumbing". E.g.:
import BlurHUD
HUD.sharedHUD.show()
HUD.sharedHUD.contentView = HUDSuccessView(title: "Success!", subtitle: nil)
HUD.sharedHUD.hide(afterDelay: 2.0)