Compare commits
118 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1761e41355 | |||
| 83c7ce6aae | |||
| a25be7e1e8 | |||
| 2f11106a92 | |||
| 64a3f8ac8b | |||
| 6c4bd53249 | |||
| d3c6f30b00 | |||
| 8a84e57ede | |||
| 427a8ababa | |||
| c45743cc20 | |||
| e726947f61 | |||
| c84bea7b7b | |||
| c24d6e7fcd | |||
| f53fbdc0af | |||
| aa9ecd55da | |||
| 980ca2a73f | |||
| 7f1f919937 | |||
| 7d8d0ddba4 | |||
| a082c2f63d | |||
| 19f91d283b | |||
| 50f23054b1 | |||
| ed8f872664 | |||
| 2065aa5c0b | |||
| bd3fee3df5 | |||
| ffaa27fb9d | |||
| 2cdf32f1ae | |||
| bc1d7f9016 | |||
| 74ad80820f | |||
| 901d5c44d2 | |||
| c05664b882 | |||
| 5ac34dd973 | |||
| 4eda67f5d9 | |||
| 4236564c5a | |||
| 973aa1b268 | |||
| ff3f08ec33 | |||
| f3dd4fd0bc | |||
| 09284ec788 | |||
| 283cd62ae1 | |||
| 70614d424f | |||
| a6d89f16d3 | |||
| d7ba79de74 | |||
| e22fcf318d | |||
| c49b6cbcf7 | |||
| 1204df15e7 | |||
| 30814ccfa5 | |||
| 98c85444eb | |||
| 48a98d393e | |||
| b9ce4bfdcc | |||
| 0c579a9010 | |||
| 7dffd6ce5b | |||
| 271252c192 | |||
| 0151c89961 | |||
| f051f095cc | |||
| 30d1919373 | |||
| 197fa72df2 | |||
| b5fac1cddf | |||
| 696108763e | |||
| 3a00e68d24 | |||
| f1a30d2784 | |||
| 255de853ee | |||
| dd23be89a7 | |||
| d238203406 | |||
| 7a43c05c46 | |||
| 46cdd1bf7f | |||
| cb9db00187 | |||
| 1543526647 | |||
| 0b40a0629b | |||
| 4b9eb5d95f | |||
| a02e54573e | |||
| 716925f14d | |||
| a6059f380d | |||
| 43771afb35 | |||
| fa29deb418 | |||
| a65593d3a0 | |||
| d4238ec4f1 | |||
| 98833ab73c | |||
| b5f5827a9e | |||
| 34e95db3bc | |||
| 4b96571371 | |||
| d6533e6992 | |||
| 93fff466fe | |||
| f8f1136bec | |||
| d8e7c5139d | |||
| 262aea3514 | |||
| 30f7fb60fa | |||
| c0548d0dfd | |||
| 06d5bf88b9 | |||
| 0ed184fc29 | |||
| 7279a44eee | |||
| 5b42b0fc86 | |||
| 1d94c3b644 | |||
| 1f0dbc5638 | |||
| 02f1e96f66 | |||
| 455b692e8e | |||
| 745ce2e13f | |||
| 6bba10e7ec | |||
| d1d331a77a | |||
| c01faa7a9a | |||
| 47234d832d | |||
| f340a05580 | |||
| e9644ed1f5 | |||
| 1e8c78dcbc | |||
| a16758efe5 | |||
| 51284b1268 | |||
| 647f4f3b93 | |||
| 3d5c3cc993 | |||
| 1321c0b8e3 | |||
| e55b47a509 | |||
| 1bf46c3ea6 | |||
| 4ba6e7f524 | |||
| 0c83edd0ca | |||
| dd0e474624 | |||
| 51b883d18a | |||
| 9b0d99b9bd | |||
| 7aa3f64d64 | |||
| aad2c4e9f8 | |||
| 4dedea8517 | |||
| 6b2d1fce69 |
@@ -16,3 +16,6 @@ profile
|
||||
# vim noise
|
||||
*~
|
||||
*.swp
|
||||
|
||||
# AppCode noise
|
||||
.idea/
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
language: objective-c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
@class HudDemoViewController;
|
||||
|
||||
|
||||
@interface HudDemoAppDelegate : NSObject <UIApplicationDelegate> {
|
||||
UIWindow *window;
|
||||
UINavigationController *navController;
|
||||
|
||||
@@ -9,23 +9,21 @@
|
||||
#import "HudDemoAppDelegate.h"
|
||||
#import "HudDemoViewController.h"
|
||||
|
||||
|
||||
@implementation HudDemoAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
@synthesize navController;
|
||||
|
||||
|
||||
- (void)applicationDidFinishLaunching:(UIApplication *)application {
|
||||
[window addSubview:navController.view];
|
||||
window.rootViewController = navController;
|
||||
[window makeKeyAndVisible];
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[navController release];
|
||||
[window release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
- (IBAction)showWithDetailsLabel:(id)sender;
|
||||
- (IBAction)showWithLabelDeterminate:(id)sender;
|
||||
- (IBAction)showWIthLabelAnnularDeterminate:(id)sender;
|
||||
- (IBAction)showWithLabelDeterminateHorizontalBar:(id)sender;
|
||||
- (IBAction)showWithCustomView:(id)sender;
|
||||
- (IBAction)showWithLabelMixed:(id)sender;
|
||||
- (IBAction)showUsingBlocks:(id)sender;
|
||||
|
||||
@@ -103,6 +103,20 @@
|
||||
[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)showWithLabelDeterminateHorizontalBar:(id)sender {
|
||||
|
||||
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
|
||||
[self.navigationController.view addSubview:HUD];
|
||||
|
||||
// Set determinate bar mode
|
||||
HUD.mode = MBProgressHUDModeDeterminateHorizontalBar;
|
||||
|
||||
HUD.delegate = self;
|
||||
|
||||
// myProgressTask uses the HUD instance to update progress
|
||||
[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)showWithCustomView:(id)sender {
|
||||
|
||||
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
|
||||
@@ -135,19 +149,17 @@
|
||||
}
|
||||
|
||||
- (IBAction)showUsingBlocks:(id)sender {
|
||||
#ifdef __BLOCKS__
|
||||
// No need to retain (just a local variable)
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
|
||||
hud.labelText = @"Loading";
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
|
||||
[self.navigationController.view addSubview:hud];
|
||||
hud.labelText = @"With a block";
|
||||
|
||||
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
|
||||
// Do a taks in the background
|
||||
[hud showAnimated:YES whileExecutingBlock:^{
|
||||
[self myTask];
|
||||
// Hide the HUD in the main tread
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[MBProgressHUD hideHUDForView:self.navigationController.view animated:YES];
|
||||
});
|
||||
});
|
||||
} completionBlock:^{
|
||||
[hud removeFromSuperview];
|
||||
[hud release];
|
||||
}];
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -171,6 +183,7 @@
|
||||
[connection release];
|
||||
|
||||
HUD = [[MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES] retain];
|
||||
HUD.delegate = self;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,6 +215,17 @@
|
||||
[hud hide:YES afterDelay:3];
|
||||
}
|
||||
|
||||
- (IBAction)showWithColor:(id)sender{
|
||||
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
|
||||
[self.navigationController.view addSubview:HUD];
|
||||
|
||||
// Set the hud to display with a color
|
||||
HUD.color = [UIColor colorWithRed:0.23 green:0.50 blue:0.82 alpha:0.90];
|
||||
|
||||
HUD.delegate = self;
|
||||
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Execution code
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
28D7ACF80DDB3853001CB0EB /* HudDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */; };
|
||||
D21D40801611CF6C005FCE55 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */; };
|
||||
D22F7D810F85241C00550BB3 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* MBProgressHUD.m */; };
|
||||
D277FDB311FC834200304321 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB211FC834200304321 /* Default.png */; };
|
||||
D277FDB911FC877E00304321 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB711FC877E00304321 /* Icon.png */; };
|
||||
@@ -35,6 +36,7 @@
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
32CA4F630368D1EE00C91783 /* HudDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HudDemo_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "Images/Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBProgressHUD.h; path = ../MBProgressHUD.h; sourceTree = SOURCE_ROOT; };
|
||||
D22F7D800F85241C00550BB3 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBProgressHUD.m; path = ../../MBProgressHUD.m; sourceTree = "<group>"; };
|
||||
D277FDB211FC834200304321 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Images/Default.png; sourceTree = "<group>"; };
|
||||
@@ -131,6 +133,7 @@
|
||||
D277FDB811FC877E00304321 /* Icon@2x.png */,
|
||||
D277FDB211FC834200304321 /* Default.png */,
|
||||
D2A6FD1C13ABC5A200BFE4C9 /* Default@2x.png */,
|
||||
D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */,
|
||||
D2F88CD5115E9F7F00E6DB82 /* 37x-Checkmark.png */,
|
||||
D286A67F1518736B00E13FB8 /* 37x-Checkmark@2x.png */,
|
||||
);
|
||||
@@ -173,7 +176,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = MB;
|
||||
LastUpgradeCheck = 0420;
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = "Matej Bukovinski";
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */;
|
||||
@@ -208,6 +211,7 @@
|
||||
D277FDBA11FC877E00304321 /* Icon@2x.png in Resources */,
|
||||
D2A6FD1D13ABC5A200BFE4C9 /* Default@2x.png in Resources */,
|
||||
D286A6801518736B00E13FB8 /* 37x-Checkmark@2x.png in Resources */,
|
||||
D21D40801611CF6C005FCE55 /* Default-568h@2x.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -278,10 +282,15 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
@@ -293,10 +302,15 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0460"
|
||||
version = "1.8">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
|
||||
BuildableName = "HudDemo.app"
|
||||
BlueprintName = "HudDemo"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
displayScaleIsEnabled = "NO"
|
||||
displayScale = "1.00"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
|
||||
BuildableName = "HudDemo.app"
|
||||
BlueprintName = "HudDemo"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
displayScaleIsEnabled = "NO"
|
||||
displayScale = "1.00"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
|
||||
BuildableName = "HudDemo.app"
|
||||
BlueprintName = "HudDemo"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -23,6 +23,8 @@
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">528</int>
|
||||
<string key="IBDocument.SystemVersion">11D50b</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.32</string>
|
||||
<string key="IBDocument.HIToolboxVersion">568.00</string>
|
||||
<string key="IBDocument.SystemVersion">12E55</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.39</string>
|
||||
<string key="IBDocument.HIToolboxVersion">626.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
<string key="NS.object.0">2083</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUIScrollView</string>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIScrollView</string>
|
||||
<string>IBUIView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -47,7 +47,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIButton" id="960472997">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 20}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="626654324">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 68}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
@@ -108,7 +108,7 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="244375631">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 116}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
@@ -134,7 +134,7 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="322519489">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 164}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
@@ -157,11 +157,11 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="706142914">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 212}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="424785"/>
|
||||
<reference key="NSNextKeyView" ref="760960186"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
@@ -178,10 +178,33 @@
|
||||
<reference key="IBUIFontDescription" ref="931117317"/>
|
||||
<reference key="IBUIFont" ref="432819284"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="760960186">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 257}, {280, 44}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="424785"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">3</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Bar determinate mode</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="434568641"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="612289531"/>
|
||||
<reference key="IBUIFontDescription" ref="931117317"/>
|
||||
<reference key="IBUIFont" ref="432819284"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="319652209">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 308}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 354}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="302056160"/>
|
||||
@@ -203,8 +226,8 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="302056160">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 356}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 400}, {280, 44}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="304407605"/>
|
||||
@@ -214,7 +237,7 @@
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">3</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Inline (blocks)</string>
|
||||
<string key="IBUINormalTitle">Using blocks</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="434568641"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
@@ -226,8 +249,8 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="304407605">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 404}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 450}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="295510578"/>
|
||||
@@ -249,8 +272,8 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="295510578">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 452}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 498}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="8005370"/>
|
||||
@@ -272,8 +295,8 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="424785">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 260}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 306}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="319652209"/>
|
||||
@@ -295,8 +318,8 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="8005370">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 499}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 545}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="686140023"/>
|
||||
@@ -318,11 +341,11 @@
|
||||
</object>
|
||||
<object class="IBUIButton" id="686140023">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">294</int>
|
||||
<string key="NSFrame">{{20, 547}, {280, 40}}</string>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 593}, {280, 40}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="NSNextKeyView" ref="952034185"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
@@ -339,8 +362,40 @@
|
||||
<reference key="IBUIFontDescription" ref="931117317"/>
|
||||
<reference key="IBUIFont" ref="432819284"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="952034185">
|
||||
<reference key="NSNextResponder" ref="821963304"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{20, 641}, {280, 37}}</string>
|
||||
<reference key="NSSuperview" ref="821963304"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Colored</string>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<reference key="IBUIFont" ref="432819284"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{320, 607}</string>
|
||||
<string key="NSFrameSize">{320, 697}</string>
|
||||
<reference key="NSSuperview" ref="560298147"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="960472997"/>
|
||||
@@ -353,7 +408,7 @@
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{320, 607}</string>
|
||||
<string key="NSFrameSize">{320, 697}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="821963304"/>
|
||||
@@ -470,7 +525,7 @@
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">108</int>
|
||||
<int key="connectionID">120</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
@@ -481,6 +536,24 @@
|
||||
</object>
|
||||
<int key="connectionID">113</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">showWithColor:</string>
|
||||
<reference key="source" ref="952034185"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">116</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">showWithLabelDeterminateHorizontalBar:</string>
|
||||
<reference key="source" ref="760960186"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">121</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
@@ -520,16 +593,18 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="244375631"/>
|
||||
<reference ref="322519489"/>
|
||||
<reference ref="319652209"/>
|
||||
<reference ref="424785"/>
|
||||
<reference ref="304407605"/>
|
||||
<reference ref="302056160"/>
|
||||
<reference ref="626654324"/>
|
||||
<reference ref="295510578"/>
|
||||
<reference ref="960472997"/>
|
||||
<reference ref="8005370"/>
|
||||
<reference ref="706142914"/>
|
||||
<reference ref="760960186"/>
|
||||
<reference ref="319652209"/>
|
||||
<reference ref="302056160"/>
|
||||
<reference ref="304407605"/>
|
||||
<reference ref="295510578"/>
|
||||
<reference ref="424785"/>
|
||||
<reference ref="8005370"/>
|
||||
<reference ref="686140023"/>
|
||||
<reference ref="952034185"/>
|
||||
</object>
|
||||
<reference key="parent" ref="560298147"/>
|
||||
</object>
|
||||
@@ -593,6 +668,16 @@
|
||||
<reference key="object" ref="686140023"/>
|
||||
<reference key="parent" ref="821963304"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">115</int>
|
||||
<reference key="object" ref="952034185"/>
|
||||
<reference key="parent" ref="821963304"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">117</int>
|
||||
<reference key="object" ref="760960186"/>
|
||||
<reference key="parent" ref="821963304"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
@@ -606,6 +691,8 @@
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>106.IBPluginDependency</string>
|
||||
<string>111.IBPluginDependency</string>
|
||||
<string>115.IBPluginDependency</string>
|
||||
<string>117.IBPluginDependency</string>
|
||||
<string>16.IBPluginDependency</string>
|
||||
<string>20.IBPluginDependency</string>
|
||||
<string>43.IBPluginDependency</string>
|
||||
@@ -638,6 +725,8 @@
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
@@ -652,7 +741,7 @@
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">113</int>
|
||||
<int key="maxID">121</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@@ -666,13 +755,17 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>showOnWindow:</string>
|
||||
<string>showSimple:</string>
|
||||
<string>showTextOnly:</string>
|
||||
<string>showURL:</string>
|
||||
<string>showUsingBlocks:</string>
|
||||
<string>showWIthLabelAnnularDeterminate:</string>
|
||||
<string>showWithColor:</string>
|
||||
<string>showWithCustomView:</string>
|
||||
<string>showWithDetailsLabel:</string>
|
||||
<string>showWithGradient:</string>
|
||||
<string>showWithLabel:</string>
|
||||
<string>showWithLabelDeterminate:</string>
|
||||
<string>showWithLabelDeterminateHorizontalBar:</string>
|
||||
<string>showWithLabelMixed:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
@@ -687,6 +780,10 @@
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
@@ -695,13 +792,17 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>showOnWindow:</string>
|
||||
<string>showSimple:</string>
|
||||
<string>showTextOnly:</string>
|
||||
<string>showURL:</string>
|
||||
<string>showUsingBlocks:</string>
|
||||
<string>showWIthLabelAnnularDeterminate:</string>
|
||||
<string>showWithColor:</string>
|
||||
<string>showWithCustomView:</string>
|
||||
<string>showWithDetailsLabel:</string>
|
||||
<string>showWithGradient:</string>
|
||||
<string>showWithLabel:</string>
|
||||
<string>showWithLabelDeterminate:</string>
|
||||
<string>showWithLabelDeterminateHorizontalBar:</string>
|
||||
<string>showWithLabelMixed:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
@@ -714,6 +815,10 @@
|
||||
<string key="name">showSimple:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showTextOnly:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showURL:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -726,6 +831,10 @@
|
||||
<string key="name">showWIthLabelAnnularDeterminate:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithColor:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithCustomView:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -734,6 +843,10 @@
|
||||
<string key="name">showWithDetailsLabel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithGradient:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -742,6 +855,10 @@
|
||||
<string key="name">showWithLabelDeterminate:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabelDeterminateHorizontalBar:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabelMixed:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -763,7 +880,7 @@
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
<real value="1552" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
@@ -771,6 +888,6 @@
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
<string key="IBCocoaTouchPluginVersion">2083</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
||||
+83
-260
@@ -2,29 +2,31 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">528</int>
|
||||
<string key="IBDocument.SystemVersion">10F569</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">788</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<string key="IBDocument.SystemVersion">12C54</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2840</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.34</string>
|
||||
<string key="IBDocument.HIToolboxVersion">625.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">117</string>
|
||||
<string key="NS.object.0">1926</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUICustomObject</string>
|
||||
<string>IBUINavigationBar</string>
|
||||
<string>IBUINavigationController</string>
|
||||
<string>IBUINavigationItem</string>
|
||||
<string>IBUIViewController</string>
|
||||
<string>IBUIWindow</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -40,9 +42,12 @@
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIWindow" id="117978783">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 480}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC44ODYyNzQ1MDk4IDAuOTA1ODgyMzUyOSAwLjkyOTQxMTc2NDcAA</bytes>
|
||||
@@ -51,10 +56,12 @@
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIResizesToFullScreen">YES</bool>
|
||||
</object>
|
||||
<object class="IBUINavigationController" id="386664917">
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
@@ -79,6 +86,7 @@
|
||||
<reference key="IBUIParentViewController" ref="386664917"/>
|
||||
<string key="IBUINibName">HudDemoViewController</string>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
@@ -120,7 +128,9 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
@@ -182,10 +192,10 @@
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>12.IBEditorWindowLastContentRect</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>15.IBEditorWindowLastContentRect</string>
|
||||
<string>15.IBPluginDependency</string>
|
||||
<string>16.CustomClassName</string>
|
||||
<string>16.IBPluginDependency</string>
|
||||
@@ -194,13 +204,13 @@
|
||||
<string>3.CustomClassName</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>UIResponder</string>
|
||||
<string>{{525, 346}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{150, 451}, {320, 480}}</string>
|
||||
<string>UIResponder</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>HudDemoViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
@@ -213,17 +223,13 @@
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">19</int>
|
||||
@@ -241,7 +247,7 @@
|
||||
<string>navController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UINavigationController</string>
|
||||
<string>UIWindow</string>
|
||||
@@ -254,7 +260,7 @@
|
||||
<string>navController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">navController</string>
|
||||
@@ -268,15 +274,7 @@
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/HudDemoAppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HudDemoAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
<string key="minorKey">./Classes/HudDemoAppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
@@ -286,15 +284,21 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>showOnWindow:</string>
|
||||
<string>showSimple:</string>
|
||||
<string>showTextOnly:</string>
|
||||
<string>showURL:</string>
|
||||
<string>showUsingBlocks:</string>
|
||||
<string>showWIthLabelAnnularDeterminate:</string>
|
||||
<string>showWithColor:</string>
|
||||
<string>showWithCustomView:</string>
|
||||
<string>showWithDetailsLabel:</string>
|
||||
<string>showWithGradient:</string>
|
||||
<string>showWithLabel:</string>
|
||||
<string>showWithLabelDeterminate:</string>
|
||||
<string>showWithLabelMixed:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
@@ -303,30 +307,62 @@
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>showOnWindow:</string>
|
||||
<string>showSimple:</string>
|
||||
<string>showTextOnly:</string>
|
||||
<string>showURL:</string>
|
||||
<string>showUsingBlocks:</string>
|
||||
<string>showWIthLabelAnnularDeterminate:</string>
|
||||
<string>showWithColor:</string>
|
||||
<string>showWithCustomView:</string>
|
||||
<string>showWithDetailsLabel:</string>
|
||||
<string>showWithGradient:</string>
|
||||
<string>showWithLabel:</string>
|
||||
<string>showWithLabelDeterminate:</string>
|
||||
<string>showWithLabelMixed:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showOnWindow:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showSimple:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showTextOnly:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showURL:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showUsingBlocks:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWIthLabelAnnularDeterminate:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithColor:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithCustomView:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -335,6 +371,10 @@
|
||||
<string key="name">showWithDetailsLabel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithGradient:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@@ -351,223 +391,7 @@
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/HudDemoViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="338465221">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIApplication</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIBarButtonItem</string>
|
||||
<string key="superclassName">UIBarItem</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIBarItem</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UINavigationBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="288212683">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UINavigationController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="950303361">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UINavigationItem</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="288212683"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIResponder</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="338465221"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchDisplayController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<reference key="sourceIdentifier" ref="950303361"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIWindow</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
||||
<string key="minorKey">./Classes/HudDemoViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -580,15 +404,14 @@
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<integer value="1024" key="NS.object.0"/>
|
||||
<real value="1536" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">HudDemo.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">117</string>
|
||||
<string key="IBCocoaTouchPluginVersion">1926</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2013 Matej Bukovinski
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+181
-71
@@ -1,12 +1,12 @@
|
||||
//
|
||||
// MBProgressHUD.h
|
||||
// Version 0.5
|
||||
// Version 0.7
|
||||
// Created by Matej Bukovinski on 2.4.09.
|
||||
//
|
||||
|
||||
// This code is distributed under the terms and conditions of the MIT license.
|
||||
|
||||
// Copyright (c) 2011 Matej Bukovinski
|
||||
// Copyright (c) 2013 Matej Bukovinski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -38,6 +38,8 @@ typedef enum {
|
||||
MBProgressHUDModeIndeterminate,
|
||||
/** Progress is shown using a round, pie-chart like, progress view. */
|
||||
MBProgressHUDModeDeterminate,
|
||||
/** Progress is shown using a horizontal progress bar */
|
||||
MBProgressHUDModeDeterminateHorizontalBar,
|
||||
/** Progress is shown using a ring-shaped progress view. */
|
||||
MBProgressHUDModeAnnularDeterminate,
|
||||
/** Shows a custom view */
|
||||
@@ -50,10 +52,20 @@ typedef enum {
|
||||
/** Opacity animation */
|
||||
MBProgressHUDAnimationFade,
|
||||
/** Opacity + scale animation */
|
||||
MBProgressHUDAnimationZoom
|
||||
MBProgressHUDAnimationZoom,
|
||||
MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,
|
||||
MBProgressHUDAnimationZoomIn
|
||||
} MBProgressHUDAnimation;
|
||||
|
||||
|
||||
#ifndef MB_INSTANCETYPE
|
||||
#if __has_feature(objc_instancetype)
|
||||
#define MB_INSTANCETYPE instancetype
|
||||
#else
|
||||
#define MB_INSTANCETYPE id
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MB_STRONG
|
||||
#if __has_feature(objc_arc)
|
||||
#define MB_STRONG strong
|
||||
@@ -72,14 +84,18 @@ typedef enum {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
typedef void (^MBProgressHUDCompletionBlock)();
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Displays a simple HUD window containing a progress indicator and two optional labels for short messages.
|
||||
*
|
||||
* This is a simple drop-in class for displaying a progress HUD view similar to Apples private UIProgressHUD class.
|
||||
* This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class.
|
||||
* The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all
|
||||
* user input on this region, thereby preventing the user operations on components below the view. The HUD itself is
|
||||
* drawn centered as a rounded semi-transparent view witch resizes depending on the user specified content.
|
||||
* drawn centered as a rounded semi-transparent view which resizes depending on the user specified content.
|
||||
*
|
||||
* This view supports four modes of operation:
|
||||
* - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView
|
||||
@@ -98,17 +114,17 @@ typedef enum {
|
||||
* Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:.
|
||||
*
|
||||
* @param view The view that the HUD will be added to
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
* @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while appearing.
|
||||
* @return A reference to the created HUD.
|
||||
*
|
||||
* @see hideHUDForView:animated:
|
||||
* @see animationType
|
||||
*/
|
||||
+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
|
||||
+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Finds the tompost HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
|
||||
* Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
|
||||
*
|
||||
* @param view The view that is going to be searched for a HUD subview.
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
@@ -128,18 +144,18 @@ typedef enum {
|
||||
* animations while disappearing.
|
||||
* @return the number of HUDs found and removed.
|
||||
*
|
||||
* @see hideAllHUDForView:animated:
|
||||
* @see hideHUDForView:animated:
|
||||
* @see animationType
|
||||
*/
|
||||
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Finds the topomost HUD subview and returns it.
|
||||
* Finds the top-most HUD subview and returns it.
|
||||
*
|
||||
* @param view The view that is going to be searched.
|
||||
* @return A reference to the last HUD subview discovered.
|
||||
*/
|
||||
+ (MBProgressHUD *)HUDForView:(UIView *)view;
|
||||
+ (MB_INSTANCETYPE)HUDForView:(UIView *)view;
|
||||
|
||||
/**
|
||||
* Finds all HUD subviews and returns them.
|
||||
@@ -149,56 +165,7 @@ typedef enum {
|
||||
*/
|
||||
+ (NSArray *)allHUDsForView:(UIView *)view;
|
||||
|
||||
/**
|
||||
* Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so
|
||||
* the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread
|
||||
* (e.g., when using something like NSOperation or calling an asynchronous call like NSUrlRequest).
|
||||
*
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)show:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the hide: method. Use it to
|
||||
* hide the HUD when your task completes.
|
||||
*
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)hide:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the hide: method. Use it to
|
||||
* hide the HUD when your task completes.
|
||||
*
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
* @param delay Delay in secons until the HUD is hidden.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;
|
||||
|
||||
/**
|
||||
* Shows the HUD while a background task is executing in a new thread, then hides the HUD.
|
||||
*
|
||||
* This method also takes care of NSAutoreleasePools so your method does not have to be concerned with setting up a
|
||||
* pool.
|
||||
*
|
||||
* @param method The method to be executed while the HUD is shown. This method will be executed in a new thread.
|
||||
* @param target The object that the target method belongs to.
|
||||
* @param object An optional object to be passed to the method.
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
*/
|
||||
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with
|
||||
* window.bounds as the parameter.
|
||||
*
|
||||
@@ -210,12 +177,105 @@ typedef enum {
|
||||
/**
|
||||
* A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with
|
||||
* view.bounds as the parameter
|
||||
*
|
||||
*
|
||||
* @param view The view instance that will provide the bounds for the HUD. Should be the same instance as
|
||||
* the HUD's superview (i.e., the view that the HUD will be added to).
|
||||
*/
|
||||
- (id)initWithView:(UIView *)view;
|
||||
|
||||
/**
|
||||
* Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so
|
||||
* the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread
|
||||
* (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest).
|
||||
*
|
||||
* @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while appearing.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)show:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to
|
||||
* hide the HUD when your task completes.
|
||||
*
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)hide:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to
|
||||
* hide the HUD when your task completes.
|
||||
*
|
||||
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while disappearing.
|
||||
* @param delay Delay in seconds until the HUD is hidden.
|
||||
*
|
||||
* @see animationType
|
||||
*/
|
||||
- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;
|
||||
|
||||
/**
|
||||
* Shows the HUD while a background task is executing in a new thread, then hides the HUD.
|
||||
*
|
||||
* This method also takes care of autorelease pools so your method does not have to be concerned with setting up a
|
||||
* pool.
|
||||
*
|
||||
* @param method The method to be executed while the HUD is shown. This method will be executed in a new thread.
|
||||
* @param target The object that the target method belongs to.
|
||||
* @param object An optional object to be passed to the method.
|
||||
* @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use
|
||||
* animations while (dis)appearing.
|
||||
*/
|
||||
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
|
||||
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
|
||||
/**
|
||||
* Shows the HUD while a block is executing on a background queue, then hides the HUD.
|
||||
*
|
||||
* @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
|
||||
*/
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block;
|
||||
|
||||
/**
|
||||
* Shows the HUD while a block is executing on a background queue, then hides the HUD.
|
||||
*
|
||||
* @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
|
||||
*/
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion;
|
||||
|
||||
/**
|
||||
* Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD.
|
||||
*
|
||||
* @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
|
||||
*/
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;
|
||||
|
||||
/**
|
||||
* Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD.
|
||||
*
|
||||
* @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will
|
||||
* not use animations while (dis)appearing.
|
||||
* @param block The block to be executed while the HUD is shown.
|
||||
* @param queue The dispatch queue on which the block should be executed.
|
||||
* @param completion The block to be executed on completion.
|
||||
*
|
||||
* @see completionBlock
|
||||
*/
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
|
||||
completionBlock:(MBProgressHUDCompletionBlock)completion;
|
||||
|
||||
/**
|
||||
* A block that gets called after the HUD was completely hidden.
|
||||
*/
|
||||
@property (copy) MBProgressHUDCompletionBlock completionBlock;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate.
|
||||
*
|
||||
@@ -231,8 +291,8 @@ typedef enum {
|
||||
@property (assign) MBProgressHUDAnimation animationType;
|
||||
|
||||
/**
|
||||
* The UIView (e.g., a UIIMageView) to be shown when the HUD is in MBProgressHUDModeCustomView.
|
||||
* For best results use a 37 by 37 pixel view (so the bounds match the build in indicator bounds).
|
||||
* The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView.
|
||||
* For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds).
|
||||
*/
|
||||
@property (MB_STRONG) UIView *customView;
|
||||
|
||||
@@ -257,22 +317,29 @@ typedef enum {
|
||||
@property (copy) NSString *detailsLabelText;
|
||||
|
||||
/**
|
||||
* The opacity of the HUD window. Defaults to 0.9 (90% opacity).
|
||||
* The opacity of the HUD window. Defaults to 0.8 (80% opacity).
|
||||
*/
|
||||
@property (assign) float opacity;
|
||||
|
||||
/**
|
||||
* The color of the HUD window. Defaults to black. If this property is set, color is set using
|
||||
* this UIColor and the opacity property is not used. using retain because performing copy on
|
||||
* UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone.
|
||||
*/
|
||||
@property (MB_STRONG) UIColor *color;
|
||||
|
||||
/**
|
||||
* The x-axis offset of the HUD relative to the centre of the superview.
|
||||
*/
|
||||
@property (assign) float xOffset;
|
||||
|
||||
/**
|
||||
* The y-ayis offset of the HUD relative to the centre of the superview.
|
||||
* The y-axis offset of the HUD relative to the centre of the superview.
|
||||
*/
|
||||
@property (assign) float yOffset;
|
||||
|
||||
/**
|
||||
* The amounth of space between the HUD edge and the HUD elements (labels, indicators or custom views).
|
||||
* The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views).
|
||||
* Defaults to 20.0
|
||||
*/
|
||||
@property (assign) float margin;
|
||||
@@ -284,7 +351,7 @@ typedef enum {
|
||||
|
||||
/*
|
||||
* Grace period is the time (in seconds) that the invoked method may be run without
|
||||
* showing the HUD. If the task finishes befor the grace time runs out, the HUD will
|
||||
* showing the HUD. If the task finishes before the grace time runs out, the HUD will
|
||||
* not be shown at all.
|
||||
* This may be used to prevent HUD display for very short tasks.
|
||||
* Defaults to 0 (no grace time).
|
||||
@@ -306,12 +373,12 @@ typedef enum {
|
||||
* This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:.
|
||||
* When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly),
|
||||
* you need to set this property when your task starts and completes in order to have normal graceTime
|
||||
* functunality.
|
||||
* functionality.
|
||||
*/
|
||||
@property (assign) BOOL taskInProgress;
|
||||
|
||||
/**
|
||||
* Removes the HUD from it's parent view when hidden.
|
||||
* Removes the HUD from its parent view when hidden.
|
||||
* Defaults to NO.
|
||||
*/
|
||||
@property (assign) BOOL removeFromSuperViewOnHide;
|
||||
@@ -366,9 +433,52 @@ typedef enum {
|
||||
*/
|
||||
@property (nonatomic, assign) float progress;
|
||||
|
||||
/**
|
||||
* Indicator progress color.
|
||||
* Defaults to white [UIColor whiteColor]
|
||||
*/
|
||||
@property (nonatomic, MB_STRONG) UIColor *progressTintColor;
|
||||
|
||||
/**
|
||||
* Indicator background (non-progress) color.
|
||||
* Defaults to translucent white (alpha 0.1)
|
||||
*/
|
||||
@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor;
|
||||
|
||||
/*
|
||||
* Display mode - NO = round or YES = annular. Defaults to round.
|
||||
*/
|
||||
@property (nonatomic, assign, getter = isAnnular) BOOL annular;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
* A flat bar progress view.
|
||||
*/
|
||||
@interface MBBarProgressView : UIView
|
||||
|
||||
/**
|
||||
* Progress (0.0 to 1.0)
|
||||
*/
|
||||
@property (nonatomic, assign) float progress;
|
||||
|
||||
/**
|
||||
* Bar border line color.
|
||||
* Defaults to white [UIColor whiteColor].
|
||||
*/
|
||||
@property (nonatomic, MB_STRONG) UIColor *lineColor;
|
||||
|
||||
/**
|
||||
* Bar background color.
|
||||
* Defaults to clear [UIColor clearColor];
|
||||
*/
|
||||
@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor;
|
||||
|
||||
/**
|
||||
* Bar progress color.
|
||||
* Defaults to white [UIColor whiteColor].
|
||||
*/
|
||||
@property (nonatomic, MB_STRONG) UIColor *progressColor;
|
||||
|
||||
@end
|
||||
|
||||
+314
-71
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// MBProgressHUD.m
|
||||
// Version 0.5
|
||||
// Version 0.7
|
||||
// Created by Matej Bukovinski on 2.4.09.
|
||||
//
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
#define MB_RETAIN(exp) [exp retain]
|
||||
#endif
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
|
||||
#define MBLabelAlignmentCenter NSTextAlignmentCenter
|
||||
#else
|
||||
#define MBLabelAlignmentCenter UITextAlignmentCenter
|
||||
#endif
|
||||
|
||||
|
||||
static const CGFloat kPadding = 4.f;
|
||||
static const CGFloat kLabelFontSize = 16.f;
|
||||
@@ -44,11 +50,11 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
- (void)deviceOrientationDidChange:(NSNotification *)notification;
|
||||
- (void)hideDelayed:(NSNumber *)animated;
|
||||
|
||||
@property (MB_STRONG) UIView *indicator;
|
||||
@property (MB_STRONG) NSTimer *graceTimer;
|
||||
@property (MB_STRONG) NSTimer *minShowTimer;
|
||||
@property (MB_STRONG) NSDate *showStarted;
|
||||
@property (assign) CGSize size;
|
||||
@property (atomic, MB_STRONG) UIView *indicator;
|
||||
@property (atomic, MB_STRONG) NSTimer *graceTimer;
|
||||
@property (atomic, MB_STRONG) NSTimer *minShowTimer;
|
||||
@property (atomic, MB_STRONG) NSDate *showStarted;
|
||||
@property (atomic, assign) CGSize size;
|
||||
|
||||
@end
|
||||
|
||||
@@ -69,6 +75,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
@synthesize animationType;
|
||||
@synthesize delegate;
|
||||
@synthesize opacity;
|
||||
@synthesize color;
|
||||
@synthesize labelFont;
|
||||
@synthesize detailsLabelFont;
|
||||
@synthesize indicator;
|
||||
@@ -91,18 +98,21 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
@synthesize detailsLabelText;
|
||||
@synthesize progress;
|
||||
@synthesize size;
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
@synthesize completionBlock;
|
||||
#endif
|
||||
|
||||
#pragma mark - Class methods
|
||||
|
||||
+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated {
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view];
|
||||
+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated {
|
||||
MBProgressHUD *hud = [[self alloc] initWithView:view];
|
||||
[view addSubview:hud];
|
||||
[hud show:animated];
|
||||
return MB_AUTORELEASE(hud);
|
||||
}
|
||||
|
||||
+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated {
|
||||
MBProgressHUD *hud = [MBProgressHUD HUDForView:view];
|
||||
MBProgressHUD *hud = [self HUDForView:view];
|
||||
if (hud != nil) {
|
||||
hud.removeFromSuperViewOnHide = YES;
|
||||
[hud hide:animated];
|
||||
@@ -112,7 +122,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
|
||||
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated {
|
||||
NSArray *huds = [self allHUDsForView:view];
|
||||
NSArray *huds = [MBProgressHUD allHUDsForView:view];
|
||||
for (MBProgressHUD *hud in huds) {
|
||||
hud.removeFromSuperViewOnHide = YES;
|
||||
[hud hide:animated];
|
||||
@@ -120,25 +130,22 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
return [huds count];
|
||||
}
|
||||
|
||||
+ (MBProgressHUD *)HUDForView:(UIView *)view {
|
||||
MBProgressHUD *hud = nil;
|
||||
NSArray *subviews = view.subviews;
|
||||
Class hudClass = [MBProgressHUD class];
|
||||
for (UIView *view in subviews) {
|
||||
if ([view isKindOfClass:hudClass]) {
|
||||
hud = (MBProgressHUD *)view;
|
||||
+ (MB_INSTANCETYPE)HUDForView:(UIView *)view {
|
||||
NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator];
|
||||
for (UIView *subview in subviewsEnum) {
|
||||
if ([subview isKindOfClass:self]) {
|
||||
return (MBProgressHUD *)subview;
|
||||
}
|
||||
}
|
||||
return hud;
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (NSArray *)allHUDsForView:(UIView *)view {
|
||||
NSMutableArray *huds = [NSMutableArray array];
|
||||
NSArray *subviews = view.subviews;
|
||||
Class hudClass = [MBProgressHUD class];
|
||||
for (UIView *view in subviews) {
|
||||
if ([view isKindOfClass:hudClass]) {
|
||||
[huds addObject:view];
|
||||
for (UIView *aView in subviews) {
|
||||
if ([aView isKindOfClass:self]) {
|
||||
[huds addObject:aView];
|
||||
}
|
||||
}
|
||||
return [NSArray arrayWithArray:huds];
|
||||
@@ -155,6 +162,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
self.labelText = nil;
|
||||
self.detailsLabelText = nil;
|
||||
self.opacity = 0.8f;
|
||||
self.color = nil;
|
||||
self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize];
|
||||
self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize];
|
||||
self.xOffset = 0.0f;
|
||||
@@ -188,12 +196,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (id)initWithView:(UIView *)view {
|
||||
NSAssert(view, @"View must not be nil.");
|
||||
id me = [self initWithFrame:view.bounds];
|
||||
// We need to take care of rotation ourselfs if we're adding the HUD to a window
|
||||
if ([view isKindOfClass:[UIWindow class]]) {
|
||||
[self setTransformForCurrentOrientation:NO];
|
||||
}
|
||||
return me;
|
||||
return [self initWithFrame:view.bounds];
|
||||
}
|
||||
|
||||
- (id)initWithWindow:(UIWindow *)window {
|
||||
@@ -204,6 +207,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[self unregisterFromNotifications];
|
||||
[self unregisterFromKVO];
|
||||
#if !__has_feature(objc_arc)
|
||||
[color release];
|
||||
[indicator release];
|
||||
[label release];
|
||||
[detailsLabel release];
|
||||
@@ -213,6 +217,9 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[minShowTimer release];
|
||||
[showStarted release];
|
||||
[customView release];
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
[completionBlock release];
|
||||
#endif
|
||||
[super dealloc];
|
||||
#endif
|
||||
}
|
||||
@@ -271,11 +278,21 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[self hideUsingAnimation:useAnimation];
|
||||
}
|
||||
|
||||
#pragma mark - View Hierrarchy
|
||||
|
||||
- (void)didMoveToSuperview {
|
||||
// We need to take care of rotation ourselfs if we're adding the HUD to a window
|
||||
if ([self.superview isKindOfClass:[UIWindow class]]) {
|
||||
[self setTransformForCurrentOrientation:NO];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Internal show & hide operations
|
||||
|
||||
- (void)showUsingAnimation:(BOOL)animated {
|
||||
self.alpha = 0.0f;
|
||||
if (animated && animationType == MBProgressHUDAnimationZoom) {
|
||||
if (animated && animationType == MBProgressHUDAnimationZoomIn) {
|
||||
self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f));
|
||||
} else if (animated && animationType == MBProgressHUDAnimationZoomOut) {
|
||||
self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f));
|
||||
}
|
||||
self.showStarted = [NSDate date];
|
||||
@@ -284,7 +301,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[UIView beginAnimations:nil context:NULL];
|
||||
[UIView setAnimationDuration:0.30];
|
||||
self.alpha = 1.0f;
|
||||
if (animationType == MBProgressHUDAnimationZoom) {
|
||||
if (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) {
|
||||
self.transform = rotationTransform;
|
||||
}
|
||||
[UIView commitAnimations];
|
||||
@@ -303,9 +320,12 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
|
||||
// 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden
|
||||
// in the done method
|
||||
if (animationType == MBProgressHUDAnimationZoom) {
|
||||
if (animationType == MBProgressHUDAnimationZoomIn) {
|
||||
self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f));
|
||||
} else if (animationType == MBProgressHUDAnimationZoomOut) {
|
||||
self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f));
|
||||
}
|
||||
|
||||
self.alpha = 0.02f;
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
@@ -325,7 +345,13 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
self.alpha = 0.0f;
|
||||
if ([delegate respondsToSelector:@selector(hudWasHidden:)]) {
|
||||
[delegate performSelector:@selector(hudWasHidden:) withObject:self];
|
||||
}
|
||||
}
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
if (self.completionBlock) {
|
||||
self.completionBlock();
|
||||
self.completionBlock = NULL;
|
||||
}
|
||||
#endif
|
||||
if (removeFromSuperViewOnHide) {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
@@ -344,6 +370,37 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[self show:animated];
|
||||
}
|
||||
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue {
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
|
||||
completionBlock:(MBProgressHUDCompletionBlock)completion {
|
||||
self.taskInProgress = YES;
|
||||
self.completionBlock = completion;
|
||||
dispatch_async(queue, ^(void) {
|
||||
block();
|
||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||
[self cleanUp];
|
||||
});
|
||||
});
|
||||
[self show:animated];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
- (void)launchExecution {
|
||||
@autoreleasepool {
|
||||
#pragma clang diagnostic push
|
||||
@@ -363,6 +420,9 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
#if !__has_feature(objc_arc)
|
||||
[targetForExecution release];
|
||||
[objectForExecution release];
|
||||
#else
|
||||
targetForExecution = nil;
|
||||
objectForExecution = nil;
|
||||
#endif
|
||||
[self hide:useAnimation];
|
||||
}
|
||||
@@ -372,7 +432,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
- (void)setupLabels {
|
||||
label = [[UILabel alloc] initWithFrame:self.bounds];
|
||||
label.adjustsFontSizeToFitWidth = NO;
|
||||
label.textAlignment = UITextAlignmentCenter;
|
||||
label.textAlignment = MBLabelAlignmentCenter;
|
||||
label.opaque = NO;
|
||||
label.backgroundColor = [UIColor clearColor];
|
||||
label.textColor = [UIColor whiteColor];
|
||||
@@ -383,7 +443,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
detailsLabel = [[UILabel alloc] initWithFrame:self.bounds];
|
||||
detailsLabel.font = self.detailsLabelFont;
|
||||
detailsLabel.adjustsFontSizeToFitWidth = NO;
|
||||
detailsLabel.textAlignment = UITextAlignmentCenter;
|
||||
detailsLabel.textAlignment = MBLabelAlignmentCenter;
|
||||
detailsLabel.opaque = NO;
|
||||
detailsLabel.backgroundColor = [UIColor clearColor];
|
||||
detailsLabel.textColor = [UIColor whiteColor];
|
||||
@@ -406,6 +466,12 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
[(UIActivityIndicatorView *)indicator startAnimating];
|
||||
[self addSubview:indicator];
|
||||
}
|
||||
else if (mode == MBProgressHUDModeDeterminateHorizontalBar) {
|
||||
// Update to bar determinate indicator
|
||||
[indicator removeFromSuperview];
|
||||
self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]);
|
||||
[self addSubview:indicator];
|
||||
}
|
||||
else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) {
|
||||
if (!isRoundIndicator) {
|
||||
// Update to determinante indicator
|
||||
@@ -432,6 +498,11 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (void)layoutSubviews {
|
||||
|
||||
// Entirely cover the parent view
|
||||
UIView *parent = self.superview;
|
||||
if (parent) {
|
||||
self.frame = parent.bounds;
|
||||
}
|
||||
CGRect bounds = self.bounds;
|
||||
|
||||
// Determine the total widt and height needed
|
||||
@@ -516,8 +587,9 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
|
||||
if (dimBackground) {
|
||||
UIGraphicsPushContext(context);
|
||||
|
||||
if (self.dimBackground) {
|
||||
//Gradient colours
|
||||
size_t gradLocationsNum = 2;
|
||||
CGFloat gradLocations[2] = {0.0f, 1.0f};
|
||||
@@ -535,15 +607,22 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
kCGGradientDrawsAfterEndLocation);
|
||||
CGGradientRelease(gradient);
|
||||
}
|
||||
|
||||
// Set background rect color
|
||||
if (self.color) {
|
||||
CGContextSetFillColorWithColor(context, self.color.CGColor);
|
||||
} else {
|
||||
CGContextSetGrayFillColor(context, 0.0f, self.opacity);
|
||||
}
|
||||
|
||||
|
||||
// Center HUD
|
||||
CGRect allRect = self.bounds;
|
||||
// Draw rounded HUD bacgroud rect
|
||||
// Draw rounded HUD backgroud rect
|
||||
CGRect boxRect = CGRectMake(roundf((allRect.size.width - size.width) / 2) + self.xOffset,
|
||||
roundf((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height);
|
||||
float radius = 10.0f;
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetGrayFillColor(context, 0.0f, self.opacity);
|
||||
CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect));
|
||||
CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0);
|
||||
CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0);
|
||||
@@ -551,6 +630,8 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0);
|
||||
CGContextClosePath(context);
|
||||
CGContextFillPath(context);
|
||||
|
||||
UIGraphicsPopContext();
|
||||
}
|
||||
|
||||
#pragma mark - KVO
|
||||
@@ -633,14 +714,14 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
|
||||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
float radians = 0;
|
||||
CGFloat radians = 0;
|
||||
if (UIInterfaceOrientationIsLandscape(orientation)) {
|
||||
if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -M_PI_2; }
|
||||
else { radians = M_PI_2; }
|
||||
if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; }
|
||||
else { radians = (CGFloat)M_PI_2; }
|
||||
// Window coordinates differ!
|
||||
self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width);
|
||||
} else {
|
||||
if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = M_PI; }
|
||||
if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; }
|
||||
else { radians = 0; }
|
||||
}
|
||||
rotationTransform = CGAffineTransformMakeRotation(radians);
|
||||
@@ -657,30 +738,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
@end
|
||||
|
||||
|
||||
@implementation MBRoundProgressView {
|
||||
float _progress;
|
||||
BOOL _annular;
|
||||
}
|
||||
|
||||
#pragma mark - Accessors
|
||||
|
||||
- (float)progress {
|
||||
return _progress;
|
||||
}
|
||||
|
||||
- (void)setProgress:(float)progress {
|
||||
_progress = progress;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (BOOL)isAnnular {
|
||||
return _annular;
|
||||
}
|
||||
|
||||
- (void)setAnnular:(BOOL)annular {
|
||||
_annular = annular;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
@implementation MBRoundProgressView
|
||||
|
||||
#pragma mark - Lifecycle
|
||||
|
||||
@@ -695,10 +753,22 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
self.opaque = NO;
|
||||
_progress = 0.f;
|
||||
_annular = NO;
|
||||
_progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f];
|
||||
_backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f];
|
||||
[self registerForKVO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self unregisterFromKVO];
|
||||
#if !__has_feature(objc_arc)
|
||||
[_progressTintColor release];
|
||||
[_backgroundTintColor release];
|
||||
[super dealloc];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Drawing
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
@@ -718,7 +788,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees
|
||||
CGFloat endAngle = (2 * (float)M_PI) + startAngle;
|
||||
[processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];
|
||||
[[UIColor colorWithRed:1 green:1 blue:1 alpha:0.1] set];
|
||||
[_backgroundTintColor set];
|
||||
[processBackgroundPath stroke];
|
||||
// Draw progress
|
||||
UIBezierPath *processPath = [UIBezierPath bezierPath];
|
||||
@@ -726,12 +796,12 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
processPath.lineWidth = lineWidth;
|
||||
endAngle = (self.progress * 2 * (float)M_PI) + startAngle;
|
||||
[processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];
|
||||
[[UIColor whiteColor] set];
|
||||
[_progressTintColor set];
|
||||
[processPath stroke];
|
||||
} else {
|
||||
// Draw background
|
||||
CGContextSetRGBStrokeColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // white
|
||||
CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 0.1f); // translucent white
|
||||
[_progressTintColor setStroke];
|
||||
[_backgroundTintColor setFill];
|
||||
CGContextSetLineWidth(context, 2.0f);
|
||||
CGContextFillEllipseInRect(context, circleRect);
|
||||
CGContextStrokeEllipseInRect(context, circleRect);
|
||||
@@ -748,4 +818,177 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - KVO
|
||||
|
||||
- (void)registerForKVO {
|
||||
for (NSString *keyPath in [self observableKeypaths]) {
|
||||
[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)unregisterFromKVO {
|
||||
for (NSString *keyPath in [self observableKeypaths]) {
|
||||
[self removeObserver:self forKeyPath:keyPath];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *)observableKeypaths {
|
||||
return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil];
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation MBBarProgressView
|
||||
|
||||
#pragma mark - Lifecycle
|
||||
|
||||
- (id)init {
|
||||
return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
_progress = 0.f;
|
||||
_lineColor = [UIColor whiteColor];
|
||||
_progressColor = [UIColor whiteColor];
|
||||
_progressRemainingColor = [UIColor clearColor];
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.opaque = NO;
|
||||
[self registerForKVO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self unregisterFromKVO];
|
||||
#if !__has_feature(objc_arc)
|
||||
[_lineColor release];
|
||||
[_progressColor release];
|
||||
[_progressRemainingColor release];
|
||||
[super dealloc];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Drawing
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
|
||||
// setup properties
|
||||
CGContextSetLineWidth(context, 2);
|
||||
CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]);
|
||||
CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]);
|
||||
|
||||
// draw line border
|
||||
float radius = (rect.size.height / 2) - 2;
|
||||
CGContextMoveToPoint(context, 2, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius);
|
||||
CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2);
|
||||
CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius);
|
||||
CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius);
|
||||
CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2);
|
||||
CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius);
|
||||
CGContextFillPath(context);
|
||||
|
||||
// draw progress background
|
||||
CGContextMoveToPoint(context, 2, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius);
|
||||
CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2);
|
||||
CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius);
|
||||
CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius);
|
||||
CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2);
|
||||
CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
// setup to draw progress color
|
||||
CGContextSetFillColorWithColor(context, [_progressColor CGColor]);
|
||||
radius = radius - 2;
|
||||
float amount = self.progress * rect.size.width;
|
||||
|
||||
// if progress is in the middle area
|
||||
if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) {
|
||||
// top
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);
|
||||
CGContextAddLineToPoint(context, amount, 4);
|
||||
CGContextAddLineToPoint(context, amount, radius + 4);
|
||||
|
||||
// bottom
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);
|
||||
CGContextAddLineToPoint(context, amount, rect.size.height - 4);
|
||||
CGContextAddLineToPoint(context, amount, radius + 4);
|
||||
|
||||
CGContextFillPath(context);
|
||||
}
|
||||
|
||||
// progress is in the right arc
|
||||
else if (amount > radius + 4) {
|
||||
float x = amount - (rect.size.width - radius - 4);
|
||||
|
||||
// top
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);
|
||||
CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4);
|
||||
float angle = -acos(x/radius);
|
||||
if (isnan(angle)) angle = 0;
|
||||
CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0);
|
||||
CGContextAddLineToPoint(context, amount, rect.size.height/2);
|
||||
|
||||
// bottom
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);
|
||||
CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4);
|
||||
angle = acos(x/radius);
|
||||
if (isnan(angle)) angle = 0;
|
||||
CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1);
|
||||
CGContextAddLineToPoint(context, amount, rect.size.height/2);
|
||||
|
||||
CGContextFillPath(context);
|
||||
}
|
||||
|
||||
// progress is in the left arc
|
||||
else if (amount < radius + 4 && amount > 0) {
|
||||
// top
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);
|
||||
CGContextAddLineToPoint(context, radius + 4, rect.size.height/2);
|
||||
|
||||
// bottom
|
||||
CGContextMoveToPoint(context, 4, rect.size.height/2);
|
||||
CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);
|
||||
CGContextAddLineToPoint(context, radius + 4, rect.size.height/2);
|
||||
|
||||
CGContextFillPath(context);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - KVO
|
||||
|
||||
- (void)registerForKVO {
|
||||
for (NSString *keyPath in [self observableKeypaths]) {
|
||||
[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)unregisterFromKVO {
|
||||
for (NSString *keyPath in [self observableKeypaths]) {
|
||||
[self removeObserver:self forKeyPath:keyPath];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *)observableKeypaths {
|
||||
return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil];
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "MBProgressHUD"
|
||||
s.version = "0.7"
|
||||
s.summary = "An iOS activity indicator view."
|
||||
s.description = <<-DESC
|
||||
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.
|
||||
DESC
|
||||
s.homepage = "http://www.bukovinski.com"
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'Matej Bukovinski' => 'matej@bukovinski.com' }
|
||||
s.source = { :git => "https://github.com/matej/MBProgressHUD.git", :tag => s.version.to_s }
|
||||
s.platform = :ios
|
||||
s.source_files = '*.{h,m}'
|
||||
s.framework = "CoreGraphics"
|
||||
s.requires_arc = true
|
||||
end
|
||||
@@ -111,7 +111,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = MB;
|
||||
LastUpgradeCheck = 0430;
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = "Matej Bukovinski";
|
||||
};
|
||||
buildConfigurationList = D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */;
|
||||
@@ -148,6 +148,10 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
@@ -171,6 +175,10 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
@@ -192,7 +200,7 @@
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PUBLIC_HEADERS_FOLDER_PATH = "$(TARGET_NAME)";
|
||||
PUBLIC_HEADERS_FOLDER_PATH = "include/$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -206,7 +214,7 @@
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PUBLIC_HEADERS_FOLDER_PATH = "$(TARGET_NAME)";
|
||||
PUBLIC_HEADERS_FOLDER_PATH = "include/$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0460"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D286A7481518C70F00E13FB8"
|
||||
BuildableName = "libMBProgressHUD.a"
|
||||
BlueprintName = "MBProgressHUD"
|
||||
ReferencedContainer = "container:MBProgressHUD.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -10,4 +10,7 @@
|
||||
<FileRef
|
||||
location = "group:README.mdown">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:LICENSE">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
+73
-83
@@ -1,7 +1,6 @@
|
||||
MBProgressHUD
|
||||
=============
|
||||
# MBProgressHUD [](https://travis-ci.org/matej/MBProgressHUD)
|
||||
|
||||
MBProgressHUD is an iOS 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 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/1.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/2.png)
|
||||
@@ -11,101 +10,92 @@ MBProgressHUD is an iOS drop-in class that displays a translucent HUD with a pro
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/6.png)
|
||||
[](http://dl.dropbox.com/u/378729/MBProgressHUD/7.png)
|
||||
|
||||
Adding MBProgressHUD to your project
|
||||
====================================
|
||||
## Requirements
|
||||
|
||||
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.
|
||||
MBProgressHUD works on any iOS version and is compatible with both ARC and non-ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
|
||||
|
||||
1. 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).
|
||||
2. Extract the archive.
|
||||
3. Open your project in Xcode, than drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` to your classes group (in the Groups & Files view).
|
||||
4. Make sure to select Copy items when asked.
|
||||
* Foundation.framework
|
||||
* UIKit.framework
|
||||
* CoreGraphics.framework
|
||||
|
||||
If you have a git tracked project, you can add MBProgressHUD as a submodule to your project.
|
||||
You will need LLVM 3.0 or later in order to build MBProgressHUD.
|
||||
|
||||
1. Move inside your git tracked project.
|
||||
2. Add MBProgressHUD as a submodule using `git submodule add git://github.com/matej/MBProgressHUD.git MBProgressHUD` .
|
||||
3. Open your project in Xcode, than drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` to your classes group (in the Groups & Files view).
|
||||
4. Don't select Copy items and select a suitable Reference type (relative to project should work fine most of the time).
|
||||
## Adding MBProgressHUD to your project
|
||||
|
||||
You can also add MBProgressHUD as a static library to your workspace. See [this article](http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/#using_a_static_library) for details.
|
||||
### Cocoapods
|
||||
|
||||
Usage
|
||||
=====
|
||||
[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project.
|
||||
|
||||
Extensive documentation is provided in the header file (MBProgressHUD.h). In addition a full Xcode demo project is included in the Demo directory.
|
||||
1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.6'`
|
||||
2. Install the pod(s) by running `pod install`.
|
||||
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
|
||||
|
||||
License
|
||||
=======
|
||||
### Source files
|
||||
|
||||
This code is distributed under the terms and conditions of the MIT license.
|
||||
Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.
|
||||
|
||||
Copyright (c) 2011 Matej Bukovinski
|
||||
1. Download the [latest code version](https://github.com/matej/MBProgressHUD/archive/master.zip) or add the repository as a git submodule to your git-tracked project.
|
||||
2. Open your project in Xcode, then drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
|
||||
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
### Static library
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
You can also add MBProgressHUD as a static library to your project or workspace.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1. Download the [latest code version](https://github.com/matej/MBProgressHUD/downloads) or add the repository as a git submodule to your git-tracked project.
|
||||
2. Open your project in Xcode, then drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the "Product Navigator view").
|
||||
3. Select your target and go to the Build phases tab. In the Link Binary With Libraries section select the add button. On the sheet find and add `libMBProgressHUD.a`. You might also need to add `MBProgressHUD` to the Target Dependencies list.
|
||||
4. Include MBProgressHUD wherever you need it with `#import <MBProgressHUD/MBProgressHUD.h>`.
|
||||
|
||||
## Usage
|
||||
|
||||
The main guideline you need to follow when dealing with MBProgressHUD while running long-running tasks is keeping the main thread work-free, so the UI can be updated promptly. The recommended way of using MBProgressHUD is therefore to set it up on the main thread and then spinning the task, that you want to perform, off onto a new thread.
|
||||
|
||||
```objective-c
|
||||
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
|
||||
// Do something...
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
If you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns.
|
||||
|
||||
```objective-c
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
hud.mode = MBProgressHUDModeAnnularDeterminate;
|
||||
hud.labelText = @"Loading";
|
||||
[self doSomethingInBackgroundWithProgressCallback:^(float progress) {
|
||||
hud.progress = progress;
|
||||
} completionCallback:^{
|
||||
[hud hide:YES];
|
||||
}];
|
||||
```
|
||||
|
||||
UI updates should always be done on the main thread. Some MBProgressHUD setters are however considered "thread safe" and can be called from background threads. Those also include `setMode:`, `setCustomView:`, `setLabelText:`, `setLabelFont:`, `setDetailsLabelText:`, `setDetailsLabelFont:` and `setProgress:`.
|
||||
|
||||
If you need to run your long-running task in the main thread, you should perform it with a slight delay, so UIKit will have enough time to update the UI (i.e., draw the HUD) before you block the main thread with your task.
|
||||
|
||||
```objective-c
|
||||
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC);
|
||||
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
|
||||
// Do something...
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
});
|
||||
```
|
||||
|
||||
You should be aware that any HUD updates issued inside the above block won't be displayed until the block completes.
|
||||
|
||||
For more examples, including how to use MBProgressHUD with asynchronous operations such as NSURLConnection, take a look at the bundled demo project. Extensive API documentation is provided in the header file (MBProgressHUD.h).
|
||||
|
||||
|
||||
Change-log
|
||||
==========
|
||||
## License
|
||||
|
||||
**Version 0.5** @ 22.03.12
|
||||
This code is distributed under the terms and conditions of the [MIT license](LICENSE).
|
||||
|
||||
- Major source code modernization and cleanup (KVO, layout code, instance vars, etc.).
|
||||
- New annular determinate mode.
|
||||
- New text only mode.
|
||||
- Added a static library project and Xcode 4 workspace.
|
||||
- Added methods to find and return HUD(s) on a view.
|
||||
- Various bug fixes.
|
||||
- Various demo project enhancements (hi-res rescues, new samples).
|
||||
## Change-log
|
||||
|
||||
IMPORTANT: Requires LLVM 3+.
|
||||
|
||||
**Version 0.41** @ 03.01.12
|
||||
|
||||
- Support for ARC.
|
||||
|
||||
**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.
|
||||
A brief summary of each MBProgressHUD release can be found on the [wiky](https://github.com/matej/MBProgressHUD/wiki/Change-log).
|
||||
|
||||
Reference in New Issue
Block a user