#APESuperHUD A simple way to display a HUD with a message or progress information in your application.
##Features
- Simplicity.
- Customizable. See Change appearance.
- Fully written in Swift.
- Unit tests.
##Requirements
- iOS 8 or later.
- Xcode 8 (Swift 3.0) or later. For Swift 2.2 use version 0.6
##Installation
####CocoaPods
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:
####Carthage
You can use Carthage to install APESuperHUD
by adding it to your Cartfile
:
github "apegroup/APESuperHUD"
##Usage Don't forget to import.
import APESuperHUD
####Show message HUD ######With default icon
APESuperHUD.showOrUpdateHUD(icon: .email, message: "1 new message", duration: 3.0, presentingView: self.view, completion: { _ in
// Completed
})
######With custom image
APESuperHUD.showOrUpdateHUD(icon: UIImage(named: "apegroup")!, message: "Demo message", duration: 3.0, presentingView: self.view, completion: { _ in
// Completed
})
######With Title
APESuperHUD.showOrUpdateHUD(title: "Title", message: "Demo message", presentingView: self.view) { _ in
// Completed
}
####Show HUD with loading indicator ######With loading text
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "Demo loading...", presentingView: self.view)
######Without loading text
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "", presentingView: self.view, completion: nil)
######With funny loading texts
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, funnyMessagesLanguage: .english, presentingView: self.view)
####Remove HUD
APESuperHUD.removeHUD(animated: true, presentingView: self.view, completion: { _ in
// Completed
})
####Change appearance
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
##Contributing All people are welcome to contribute. See CONTRIBUTING for details.
##License APESuperHUD is released under the MIT license. See LICENSE for details.