Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a7c3601fbd | |||
| c843711aa8 | |||
| ec7d1e4aca | |||
| aec802ba2c | |||
| e1e6052966 | |||
| 51291d888e | |||
| 0088039ee7 | |||
| 6424bb843b | |||
| 117d524029 | |||
| cd545e566d | |||
| e5ff0eb91b | |||
| 59a8240da6 |
+2
-1
@@ -8,6 +8,7 @@
|
||||
- Includes a rewritten demo app.
|
||||
- Includes a rewritten iOS example app.
|
||||
- Updates and extends documentation.
|
||||
- Adds a new button property (cancellation support).
|
||||
- Adds support for `NSProgress`
|
||||
- Adds a new customizable background view class.
|
||||
- Adds new assertions.
|
||||
@@ -114,4 +115,4 @@ IMPORTANT: Requires LLVM 3+.
|
||||
|
||||
**Version 0.1** @ 2.4.09
|
||||
|
||||
- Initial release.
|
||||
- Initial release.
|
||||
|
||||
@@ -152,11 +152,11 @@
|
||||
hud.mode = MBProgressHUDModeDeterminate;
|
||||
hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title");
|
||||
|
||||
// Set up NSPorgress
|
||||
// Set up NSProgress
|
||||
NSProgress *progressObject = [NSProgress progressWithTotalUnitCount:100];
|
||||
hud.progressObject = progressObject;
|
||||
|
||||
// Configure a cacnel button.
|
||||
// Configure a cancel button.
|
||||
[hud.button setTitle:NSLocalizedString(@"Cancel", @"HUD cancel button title") forState:UIControlStateNormal];
|
||||
[hud.button addTarget:progressObject action:@selector(cancel) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
- (void)textExample {
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
|
||||
|
||||
// Set the annular determinate mode to show task progress.
|
||||
// Set the text mode to show only text.
|
||||
hud.mode = MBProgressHUDModeText;
|
||||
hud.label.text = NSLocalizedString(@"Message here!", @"HUD message title");
|
||||
// Move to bottm center.
|
||||
|
||||
+2
-2
@@ -105,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @name Showing and hiding
|
||||
|
||||
/**
|
||||
* Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
|
||||
* Finds the top-most HUD subview that hasn't finished and hides it. The counterpart to this method is showHUDAddedTo:animated:.
|
||||
*
|
||||
* @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden.
|
||||
*
|
||||
@@ -120,7 +120,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Finds the top-most HUD subview and returns it.
|
||||
* Finds the top-most HUD subview that hasn't finished and returns it.
|
||||
*
|
||||
* @param view The view that is going to be searched.
|
||||
* @return A reference to the last HUD subview discovered.
|
||||
|
||||
+5
-2
@@ -80,7 +80,10 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator];
|
||||
for (UIView *subview in subviewsEnum) {
|
||||
if ([subview isKindOfClass:self]) {
|
||||
return (MBProgressHUD *)subview;
|
||||
MBProgressHUD *hud = (MBProgressHUD *)subview;
|
||||
if (hud.hasFinished == NO) {
|
||||
return hud;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
@@ -784,7 +787,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
- (void)updateForCurrentOrientationAnimated:(BOOL)animated {
|
||||
// Stay in sync with the superview in any case
|
||||
if (self.superview) {
|
||||
self.bounds = self.superview.bounds;
|
||||
self.frame = self.superview.bounds;
|
||||
}
|
||||
|
||||
// Not needed on iOS 8+, compile out when the deployment target allows,
|
||||
|
||||
@@ -224,6 +224,7 @@
|
||||
1D104D8E1ACA36CC00973364 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -258,6 +259,7 @@
|
||||
1D104D8F1ACA36CC00973364 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
|
||||
+7
-7
@@ -5,13 +5,13 @@
|
||||
|
||||
`MBProgressHUD` is an iOS drop-in class that displays a translucent HUD with an indicator and/or 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.
|
||||
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/1.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/2.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/3.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/4.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/5.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/6.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/v1/7.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737572/94a137a6-477f-11e7-9778-6266006f2dba.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737575/95178c6c-477f-11e7-8df9-03aeeca5d39d.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737578/95235920-477f-11e7-9968-9ecf506aba06.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737573/95048432-477f-11e7-8f1d-4d5736b10488.)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737580/954aff70-477f-11e7-9634-5802daea2dee.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737582/9552886c-477f-11e7-8e90-46acd9a8527c.png)
|
||||
[](https://cloud.githubusercontent.com/assets/91322/26737584/956392f6-477f-11e7-918f-717a42758156.png)
|
||||
|
||||
**NOTE:** The class has recently undegone a major rewrite. The old version is available in the [legacy](https://github.com/jdg/MBProgressHUD/tree/legacy) branch, should you need it.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user