Permalink
Browse files

Disable network indicator using -DSVPROGRESSHUD_DISABLE_NETWORK_INDIC…

…ATOR cflag.
  • Loading branch information...
1 parent a449768 commit 9ecad26e62b7b5d6500f977b6f0c1a063cf29b4a @samvermette samvermette committed Nov 19, 2011
@@ -226,6 +226,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SVProgressHUD_Prefix.pch;
INFOPLIST_FILE = "SVProgressHUD-Info.plist";
+ OTHER_CFLAGS = "-DSVPROGRESSHUD_DISABLE_NETWORK_INDICATOR";
PRODUCT_NAME = SVProgressHUD;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
View
@@ -3,7 +3,7 @@ h1. SVProgressHUD
SVProgressHUD is an easy-to-use, clean and lightweight progress HUD for iOS. It's a simplified and prettified alternative to the popular "MBProgressHUD":https://github.com/jdg/MBProgressHUD. Its fade in/out animations are highly inspired on Lauren Britcher's HUD in Tweetie for iOS. The success and error icons are from "Glyphish":http://glyphish.com/.
-!http://samvermette.com/files/svprogresshud3.png!
+!http://f.cl.ly/items/231Y2A0t0t1J0B0r3N0p/svprogresshud3.png!
SVProgressHUD features:
@@ -75,7 +75,7 @@ enum {
h3. Network activity indicator
-By default, showing SVProgressHUD will also show the network activity indicator (this makes sense for apps that make a lot of network operations). You can change this behavior by setting the @SVProgressHUDShowNetworkIndicator@ constant to @0@ in @SVProgressHUD.h@.
+By default, showing SVProgressHUD also activates the network activity indicator (this makes sense for apps that make a lot of network operations). If you'd like SVProgressHUD to not show the network indicator by default, you can add @-DSVPROGRESSHUD_DISABLE_NETWORK_INDICATOR@ to your project's CFLAGS (in build settings). You can also set this on a per-call basis, using the show methods that boast a @networkIndicator@ parameter.
h2. Automatic Referencing counting (ARC) support
@@ -10,7 +10,8 @@
#import <UIKit/UIKit.h>
#import <AvailabilityMacros.h>
-#define SVProgressHUDShowNetworkIndicator 1
+// To disable SVProgressHUD's control of the network activity indicator by default,
+// add -DSVPROGRESSHUD_DISABLE_NETWORK_INDICATOR to CFLAGS in build settings.
enum {
SVProgressHUDMaskTypeNone = 1, // allow user interactions while HUD is displayed
@@ -10,6 +10,12 @@
#import "SVProgressHUD.h"
#import <QuartzCore/QuartzCore.h>
+#ifdef SVPROGRESSHUD_DISABLE_NETWORK_INDICATOR
+#define SVProgressHUDShowNetworkIndicator 0
+#else
+#define SVProgressHUDShowNetworkIndicator 1
+#endif
+
@interface SVProgressHUD ()
@property (nonatomic, readwrite) SVProgressHUDMaskType maskType;

0 comments on commit 9ecad26

Please sign in to comment.