Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove all the network activity indicator stuff.

  • Loading branch information...
commit 29ec4c2390973f9f09c8b780d500c98df1e89c79 1 parent 1762fce
@samvermette samvermette authored
Showing with 2 additions and 39 deletions.
  1. +0 −5 SVProgressHUD/SVProgressHUD.h
  2. +2 −34 SVProgressHUD/SVProgressHUD.m
View
5 SVProgressHUD/SVProgressHUD.h
@@ -41,9 +41,4 @@ typedef NSUInteger SVProgressHUDMaskType;
+ (BOOL)isVisible;
-// deprecated methods; it shouldn't be the HUD's responsability to show/hide the network activity indicator
-+ (void)showWithStatus:(NSString*)status networkIndicator:(BOOL)show DEPRECATED_ATTRIBUTE;
-+ (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType networkIndicator:(BOOL)show DEPRECATED_ATTRIBUTE;
-+ (void)showWithMaskType:(SVProgressHUDMaskType)maskType networkIndicator:(BOOL)show DEPRECATED_ATTRIBUTE;
-
@end
View
36 SVProgressHUD/SVProgressHUD.m
@@ -13,7 +13,6 @@
@interface SVProgressHUD ()
@property (nonatomic, readwrite) SVProgressHUDMaskType maskType;
-@property (nonatomic, readwrite) BOOL showNetworkIndicator;
@property (nonatomic) NSTimer *fadeOutTimer;
@property (nonatomic, readonly) UIWindow *overlayWindow;
@@ -39,7 +38,7 @@ - (void)dismissWithStatus:(NSString*)string error:(BOOL)error afterDelay:(NSTime
@implementation SVProgressHUD
-@synthesize overlayWindow, hudView, maskType, showNetworkIndicator, fadeOutTimer, stringLabel, imageView, spinnerView, visibleKeyboardHeight;
+@synthesize overlayWindow, hudView, maskType, fadeOutTimer, stringLabel, imageView, spinnerView, visibleKeyboardHeight;
- (void)dealloc {
self.fadeOutTimer = nil;
@@ -77,18 +76,6 @@ + (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskTyp
[[SVProgressHUD sharedView] showWithStatus:status maskType:maskType networkIndicator:NO];
}
-+ (void)showWithStatus:(NSString *)status networkIndicator:(BOOL)show {
- [[SVProgressHUD sharedView] showWithStatus:status maskType:SVProgressHUDMaskTypeNone networkIndicator:show];
-}
-
-+ (void)showWithMaskType:(SVProgressHUDMaskType)maskType networkIndicator:(BOOL)show {
- [[SVProgressHUD sharedView] showWithStatus:nil maskType:maskType networkIndicator:show];
-}
-
-+ (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType networkIndicator:(BOOL)show {
- [[SVProgressHUD sharedView] showWithStatus:status maskType:maskType networkIndicator:show];
-}
-
+ (void)showSuccessWithStatus:(NSString *)string {
[SVProgressHUD showSuccessWithStatus:string duration:1];
}
@@ -352,15 +339,6 @@ - (void)showWithStatus:(NSString*)string maskType:(SVProgressHUDMaskType)hudMask
[self.overlayWindow addSubview:self];
self.fadeOutTimer = nil;
-
- if(self.showNetworkIndicator)
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
-
- self.showNetworkIndicator = show;
-
- if(self.showNetworkIndicator)
- [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
-
self.imageView.hidden = YES;
self.maskType = hudMaskType;
@@ -405,11 +383,6 @@ - (void)dismissWithStatus:(NSString *)string error:(BOOL)error afterDelay:(NSTim
if(self.alpha != 1)
return;
- if(self.showNetworkIndicator) {
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- self.showNetworkIndicator = NO;
- }
-
if(error)
self.imageView.image = [UIImage imageNamed:@"SVProgressHUD.bundle/error.png"];
else
@@ -425,12 +398,7 @@ - (void)dismissWithStatus:(NSString *)string error:(BOOL)error afterDelay:(NSTim
- (void)dismiss {
dispatch_async(dispatch_get_main_queue(), ^{
-
- if(self.showNetworkIndicator) {
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- self.showNetworkIndicator = NO;
- }
-
+
[UIView animateWithDuration:0.15
delay:0
options:UIViewAnimationCurveEaseIn | UIViewAnimationOptionAllowUserInteraction
Please sign in to comment.
Something went wrong with that request. Please try again.