A simple way to display a HUD with a message or progress information in your application.
- Simplicity.
- Customizable. See Change appearance.
- Fully written in Swift.
- Unit tests.
- iOS 8 or later.
- Xcode 8 (Swift 3.0) or later. For Swift 2.2 use version 0.6
You can use CocoaPods to install APESuperHUD
by adding it to your Podfile
:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'APESuperHUD', :git => 'https://github.com/apegroup/APESuperHUD.git'
end
Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0:
You can use Carthage to install APESuperHUD
by adding it to your Cartfile
:
github "apegroup/APESuperHUD"
Don't forget to import.
import APESuperHUD
APESuperHUD.showOrUpdateHUD(icon: .email, message: "1 new message", duration: 3.0, presentingView: self.view, completion: { _ in
// Completed
})
APESuperHUD.showOrUpdateHUD(icon: UIImage(named: "apegroup")!, message: "Demo message", duration: 3.0, presentingView: self.view, completion: { _ in
// Completed
})
APESuperHUD.showOrUpdateHUD(title: "Title", message: "Demo message", presentingView: self.view) { _ in
// Completed
}
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "Demo loading...", presentingView: self.view)
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "", presentingView: self.view, completion: nil)
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, funnyMessagesLanguage: .english, presentingView: self.view)
APESuperHUD.removeHUD(animated: true, presentingView: self.view, completion: { _ in
// Completed
})
APESuperHUD.appearance.cornerRadius = 12
APESuperHUD.appearance.animateInTime = 1.0
APESuperHUD.appearance.animateOutTime = 1.0
APESuperHUD.appearance.backgroundBlurEffect = .none
APESuperHUD.appearance.iconColor = UIColor.green
APESuperHUD.appearance.textColor = UIColor.green
APESuperHUD.appearance.loadingActivityIndicatorColor = UIColor.green
APESuperHUD.appearance.defaultDurationTime = 4.0
APESuperHUD.appearance.cancelableOnTouch = true
APESuperHUD.appearance.iconWidth = 48
APESuperHUD.appearance.iconHeight = 48
APESuperHUD.appearance.messageFontName = "Caviar Dreams"
APESuperHUD.appearance.titleFontName = "Caviar Dreams"
APESuperHUD.appearance.titleFontSize = 22
APESuperHUD.appearance.messageFontSize = 14
All people are welcome to contribute. See CONTRIBUTING for details.
APESuperHUD is released under the MIT license. See LICENSE for details.