Welcome to the documentation for ACProgressHUD-Swift! ACProgressHUD-Swift is a lightweight and easy-to-use HUD (Head-up Display) library written in Swift. It provides beautiful and customizable loading indicators and progress bars for iOS applications.
ACProgressHUD-Swift can be installed using CocoaPods or manually by adding the source files to your Xcode project.
To integrate ACProgressHUD-Swift into your project using CocoaPods, add the following line to your Podfile:
Then, run the following command:
If you prefer not to use CocoaPods, you can manually add the source files to your project:
- Download and extract the ACProgressHUD-Swift source files.
- Drag and drop the
ACProgressHUD.swiftfile into your Xcode project.
- Make sure to select the option “Copy items if needed” when prompted.
Show a HUD
To display a HUD, simply call the following method:
This will show a default HUD with a spinning loading indicator, centered on the screen.
ACProgressHUD-Swift provides various customization options to tailor the appearance of the HUD:
Type: You can specify the type of HUD, such as default, success, error, progress, or custom.
Text: You can set the text displayed on the HUD.
Animation: You can customize the animation style of the HUD.
Colors: You can define the background color, indicator color, and text color of the HUD.
Hide the HUD
To hide the HUD, call the following method:
ACProgressHUD-Swift is a powerful and flexible HUD library that enables you to easily add loading indicators and progress bars to your iOS applications. With its customizable options, you can provide a seamless user experience while your app performs background tasks.