MBProgressHUD is an iPhone drop-in class that displays a translucent HUD with a progress indicator and some optional labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.
MBProgressHUD is iOS4 and iPad compatible and released under the MIT license (see MBProgressHUD.h).
The simplest way to add the MBProgressHUD to your project is to directly add the MBProgressHUD.h
and MBProgressHUD.m
source files to your project.
- Download the latest code version from the repository (you can simply use the Download Source button and get the zip or tar archive of the master branch).
- Extract the archive.
- Open your project in Xcode, than drag and drop
MBProgressHUD.h
andMBProgressHUD.m
to your classes group (in the Groups & Files view). - Make sure to select Copy items when asked.
If you have a git tracked project, you can add MBProgressHUD as a submodule to your project.
- Move inside your git tracked project.
- Add MBProgressHUD as a submodule using
git submodule add git://github.com/matej/MBProgressHUD.git MBProgressHUD
. - Open your project in Xcode, than drag and drop
MBProgressHUD.h
andMBProgressHUD.m
to your classes group (in the Groups & Files view). - Don't select Copy items and select a suitable Reference type (relative to project should work fine most of the time).
A full Xcode demo project is included in the Demo directory. This should give you an idea how to use the class.
Extensive documentation is provided in the header file (MBProgressHUD.h).
Version 0.4 @ 25.07.10
- Different animation modes. Default set to zoom.
- Class convenience methods (tadelv - http://github.com/tadelv).
- Autorotation when added to a UIWindow (wuf810 - http://github.com/wuf810).
- Extended demo app.
- Several smaller fixes.
Version 0.33 @ 27.03.10
- Custom view operation mode added.
- Fixed a memory leak.
Version 0.32 @ 4.01.10
- Added minShowTime, graceTime, xOffset, yOffset.
- Various fixes.
Version 0.31 @ 8.10.09
- Fix for touch through during the fade-out animation.
Version 0.3 @ 30.9.09
- Added show: and hide: methods.
- Now using UIViews layoutSubviews to automate layout calls.
- Added some floors to round pixel positions and thereby prevent unsharp views.
- Some additional documentation and code cleanup.
Version 0.2 @ 21.7.09
- Added determinate progress mode and switching capabilities between determinate and indeterminate modes.
- Various bugfixes.
Version 0.11 @ 2.6.09.
- Updated labelText and detailsLabelText properties to support text modifications while the HUD is being shown.
Version 0.1 @ 2.4.09
- Initial release.