Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c8ef3d5f1 | |||
| b157ecb0ac | |||
| fdd147f3c2 | |||
| fa5cc8e4ec | |||
| 2894a431bd | |||
| 61e8f0ad13 | |||
| ed4f0d0ec1 | |||
| 5c879487e2 | |||
| d4581b29f3 | |||
| fc51985417 | |||
| e7b749355c | |||
| fd37963b08 | |||
| c7b897895d | |||
| a50f7a36a4 | |||
| 355651dd21 | |||
| 6beae8260e | |||
| b68750e3a0 | |||
| febda3cb4b | |||
| 21020cdc4e | |||
| 5565c64f89 | |||
| 3e095ae0b9 | |||
| b0f1f66148 | |||
| 1761e41355 | |||
| 83c7ce6aae | |||
| a25be7e1e8 | |||
| 2f11106a92 | |||
| 64a3f8ac8b | |||
| 6c4bd53249 | |||
| d3c6f30b00 | |||
| 8a84e57ede | |||
| 427a8ababa | |||
| c45743cc20 | |||
| e726947f61 | |||
| c84bea7b7b | |||
| c24d6e7fcd | |||
| f53fbdc0af | |||
| aa9ecd55da | |||
| 980ca2a73f | |||
| 7f1f919937 | |||
| 7d8d0ddba4 | |||
| a082c2f63d | |||
| 19f91d283b | |||
| 50f23054b1 | |||
| ed8f872664 | |||
| 2065aa5c0b | |||
| 973aa1b268 |
@@ -1 +0,0 @@
|
||||
*.pbxproj -crlf -diff -merge
|
||||
@@ -0,0 +1 @@
|
||||
language: objective-c
|
||||
@@ -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;
|
||||
|
||||
@@ -9,16 +9,20 @@
|
||||
#import "HudDemoViewController.h"
|
||||
#import <unistd.h>
|
||||
|
||||
@implementation HudDemoViewController
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Constants
|
||||
#define SCREENSHOT_MODE 0
|
||||
|
||||
|
||||
@implementation HudDemoViewController
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Lifecycle methods
|
||||
|
||||
- (void)viewDidLoad {
|
||||
UIView *content = [[self.view subviews] objectAtIndex:0];
|
||||
#if SCREENSHOT_MODE
|
||||
[content.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||
#endif
|
||||
((UIScrollView *)self.view).contentSize = content.bounds.size;
|
||||
}
|
||||
|
||||
@@ -103,6 +107,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];
|
||||
@@ -161,7 +179,7 @@
|
||||
}
|
||||
|
||||
- (IBAction)showURL:(id)sender {
|
||||
NSURL *URL = [NSURL URLWithString:@"https://github.com/matej/MBProgressHUD/zipball/master"];
|
||||
NSURL *URL = [NSURL URLWithString:@"http://a1408.g.akamai.net/5/1408/1388/2005110403/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_iPod.m4v.zip"];
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
|
||||
|
||||
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
|
||||
@@ -247,9 +265,13 @@
|
||||
HUD.mode = MBProgressHUDModeIndeterminate;
|
||||
HUD.labelText = @"Cleaning up";
|
||||
sleep(2);
|
||||
// The sample image is based on the work by www.pixelpressicons.com, http://creativecommons.org/licenses/by/2.5/ca/
|
||||
// Make the customViews 37 by 37 pixels for best results (those are the bounds of the build-in progress indicators)
|
||||
HUD.customView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"37x-Checkmark.png"]] autorelease];
|
||||
// UIImageView is a UIKit class, we have to initialize it on the main thread
|
||||
__block UIImageView *imageView;
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
UIImage *image = [UIImage imageNamed:@"37x-Checkmark.png"];
|
||||
imageView = [[UIImageView alloc] initWithImage:image];
|
||||
});
|
||||
HUD.customView = [imageView autorelease];
|
||||
HUD.mode = MBProgressHUDModeCustomView;
|
||||
HUD.labelText = @"Completed";
|
||||
sleep(2);
|
||||
@@ -259,7 +281,7 @@
|
||||
#pragma mark NSURLConnectionDelegete
|
||||
|
||||
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
|
||||
expectedLength = [response expectedContentLength];
|
||||
expectedLength = MAX([response expectedContentLength], 1);
|
||||
currentLength = 0;
|
||||
HUD.mode = MBProgressHUDModeDeterminate;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
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 */; };
|
||||
D24A23051780ADCD0020310A /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = D22568E61780AA77008D5939 /* Icon-Small.png */; };
|
||||
D24A23061780ADD10020310A /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D22568E71780AA77008D5939 /* Icon-Small@2x.png */; };
|
||||
D24A23071780ADDA0020310A /* Icon-iOS7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D22568E51780A9C6008D5939 /* Icon-iOS7@2x.png */; };
|
||||
D24A23081780ADE60020310A /* Default-iOS7-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D22568E31780A913008D5939 /* Default-iOS7-568h@2x.png */; };
|
||||
D24A23091780ADE90020310A /* Default-iOS7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D22568E41780A913008D5939 /* Default-iOS7@2x.png */; };
|
||||
D277FDB311FC834200304321 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB211FC834200304321 /* Default.png */; };
|
||||
D277FDB911FC877E00304321 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB711FC877E00304321 /* Icon.png */; };
|
||||
D277FDBA11FC877E00304321 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB811FC877E00304321 /* Icon@2x.png */; };
|
||||
@@ -37,6 +42,11 @@
|
||||
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>"; };
|
||||
D22568E31780A913008D5939 /* Default-iOS7-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-iOS7-568h@2x.png"; path = "Images/Default-iOS7-568h@2x.png"; sourceTree = "<group>"; };
|
||||
D22568E41780A913008D5939 /* Default-iOS7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-iOS7@2x.png"; path = "Images/Default-iOS7@2x.png"; sourceTree = "<group>"; };
|
||||
D22568E51780A9C6008D5939 /* Icon-iOS7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-iOS7@2x.png"; path = "Images/Icon-iOS7@2x.png"; sourceTree = "<group>"; };
|
||||
D22568E61780AA77008D5939 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Images/Icon-Small.png"; sourceTree = "<group>"; };
|
||||
D22568E71780AA77008D5939 /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small@2x.png"; path = "Images/Icon-Small@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,9 +141,14 @@
|
||||
children = (
|
||||
D277FDB711FC877E00304321 /* Icon.png */,
|
||||
D277FDB811FC877E00304321 /* Icon@2x.png */,
|
||||
D22568E61780AA77008D5939 /* Icon-Small.png */,
|
||||
D22568E71780AA77008D5939 /* Icon-Small@2x.png */,
|
||||
D22568E51780A9C6008D5939 /* Icon-iOS7@2x.png */,
|
||||
D277FDB211FC834200304321 /* Default.png */,
|
||||
D2A6FD1C13ABC5A200BFE4C9 /* Default@2x.png */,
|
||||
D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */,
|
||||
D22568E31780A913008D5939 /* Default-iOS7-568h@2x.png */,
|
||||
D22568E41780A913008D5939 /* Default-iOS7@2x.png */,
|
||||
D2F88CD5115E9F7F00E6DB82 /* 37x-Checkmark.png */,
|
||||
D286A67F1518736B00E13FB8 /* 37x-Checkmark@2x.png */,
|
||||
);
|
||||
@@ -176,7 +191,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = MB;
|
||||
LastUpgradeCheck = 0460;
|
||||
LastUpgradeCheck = 0500;
|
||||
ORGANIZATIONNAME = "Matej Bukovinski";
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */;
|
||||
@@ -211,7 +226,12 @@
|
||||
D277FDBA11FC877E00304321 /* Icon@2x.png in Resources */,
|
||||
D2A6FD1D13ABC5A200BFE4C9 /* Default@2x.png in Resources */,
|
||||
D286A6801518736B00E13FB8 /* 37x-Checkmark@2x.png in Resources */,
|
||||
D24A23081780ADE60020310A /* Default-iOS7-568h@2x.png in Resources */,
|
||||
D24A23051780ADCD0020310A /* Icon-Small.png in Resources */,
|
||||
D24A23071780ADDA0020310A /* Icon-iOS7@2x.png in Resources */,
|
||||
D21D40801611CF6C005FCE55 /* Default-568h@2x.png in Resources */,
|
||||
D24A23061780ADD10020310A /* Icon-Small@2x.png in Resources */,
|
||||
D24A23091780ADE90020310A /* Default-iOS7@2x.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -281,8 +301,9 @@
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -290,7 +311,9 @@
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
@@ -301,8 +324,9 @@
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -310,7 +334,9 @@
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0500"
|
||||
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>
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
@@ -12,6 +12,8 @@
|
||||
<string></string>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Icon-Small</string>
|
||||
<string>Icon-iOS7</string>
|
||||
<string>Icon.png</string>
|
||||
<string>Icon@2x.png</string>
|
||||
</array>
|
||||
@@ -33,6 +35,29 @@
|
||||
<true/>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainWindow</string>
|
||||
<key>UILaunchImages</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UILaunchImageMinimumOSVersion</key>
|
||||
<string>7.0</string>
|
||||
<key>UILaunchImageName</key>
|
||||
<string>Default-iOS7</string>
|
||||
<key>UILaunchImageOrientation</key>
|
||||
<string>Portrait</string>
|
||||
<key>UILaunchImageSize</key>
|
||||
<string>{320, 568}</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UILaunchImageMinimumOSVersion</key>
|
||||
<string>7.0</string>
|
||||
<key>UILaunchImageName</key>
|
||||
<string>Default-iOS7</string>
|
||||
<key>UILaunchImageOrientation</key>
|
||||
<string>Portrait</string>
|
||||
<key>UILaunchImageSize</key>
|
||||
<string>{320, 480}</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
||||
@@ -1,417 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">528</int>
|
||||
<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">1926</string>
|
||||
</object>
|
||||
<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">
|
||||
<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>
|
||||
<object class="IBProxyObject" id="841351856">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="427554174">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUICustomObject" id="664661524">
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIWindow" id="117978783">
|
||||
<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>
|
||||
</object>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<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>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
<object class="IBUINavigationBar" key="IBUINavigationBar" id="500961041">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{0, 0}</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBUIViewControllers">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIViewController" id="934427715">
|
||||
<string key="IBUITitle">MBProgressHUD</string>
|
||||
<object class="IBUINavigationItem" key="IBUINavigationItem" id="390734610">
|
||||
<string key="IBUITitle">MBProgressHUD</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<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>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="664661524"/>
|
||||
</object>
|
||||
<int key="connectionID">4</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="117978783"/>
|
||||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">navController</string>
|
||||
<reference key="source" ref="664661524"/>
|
||||
<reference key="destination" ref="386664917"/>
|
||||
</object>
|
||||
<int key="connectionID">19</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="841351856"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="664661524"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">HudDemo App Delegate</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="427554174"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="117978783"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">15</int>
|
||||
<reference key="object" ref="386664917"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="934427715"/>
|
||||
<reference ref="500961041"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">16</int>
|
||||
<reference key="object" ref="934427715"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="390734610"/>
|
||||
</object>
|
||||
<reference key="parent" ref="386664917"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">17</int>
|
||||
<reference key="object" ref="500961041"/>
|
||||
<reference key="parent" ref="386664917"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">18</int>
|
||||
<reference key="object" ref="390734610"/>
|
||||
<reference key="parent" ref="934427715"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>15.IBPluginDependency</string>
|
||||
<string>16.CustomClassName</string>
|
||||
<string>16.IBPluginDependency</string>
|
||||
<string>17.IBPluginDependency</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>3.CustomClassName</string>
|
||||
<string>3.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>HudDemoAppDelegate</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<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"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">19</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HudDemoAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>navController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UINavigationController</string>
|
||||
<string>UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>navController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">navController</string>
|
||||
<string key="candidateClassName">UINavigationController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">window</string>
|
||||
<string key="candidateClassName">UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
</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">HudDemoViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<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="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<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>
|
||||
<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="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>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<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>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabelDeterminate:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">showWithLabelMixed:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/HudDemoViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<integer value="528" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<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>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">1926</string>
|
||||
</data>
|
||||
</archive>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4457.9" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment version="528" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3682.9"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="3" id="4"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<customObject id="3" userLabel="HudDemo App Delegate" customClass="HudDemoAppDelegate">
|
||||
<connections>
|
||||
<outlet property="navController" destination="15" id="19"/>
|
||||
<outlet property="window" destination="12" id="14"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<window opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="12">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.8862745098" green="0.90588235289999997" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
|
||||
</window>
|
||||
<navigationController id="15">
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics"/>
|
||||
<nil key="simulatedDestinationMetrics"/>
|
||||
<navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="17">
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<viewControllers>
|
||||
<viewController title="MBProgressHUD" nibName="HudDemoViewController" id="16" customClass="HudDemoViewController">
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<navigationItem key="navigationItem" title="MBProgressHUD" id="18"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics"/>
|
||||
<nil key="simulatedDestinationMetrics"/>
|
||||
</viewController>
|
||||
</viewControllers>
|
||||
</navigationController>
|
||||
</objects>
|
||||
<classes>
|
||||
<class className="HudDemoAppDelegate" superclassName="NSObject">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/HudDemoAppDelegate.h"/>
|
||||
<relationships>
|
||||
<relationship kind="outlet" name="navController" candidateClass="UINavigationController"/>
|
||||
<relationship kind="outlet" name="window" candidateClass="UIWindow"/>
|
||||
</relationships>
|
||||
</class>
|
||||
<class className="HudDemoViewController" superclassName="UIViewController">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/HudDemoViewController.h"/>
|
||||
<relationships>
|
||||
<relationship kind="action" name="showOnWindow:"/>
|
||||
<relationship kind="action" name="showSimple:"/>
|
||||
<relationship kind="action" name="showTextOnly:"/>
|
||||
<relationship kind="action" name="showURL:"/>
|
||||
<relationship kind="action" name="showUsingBlocks:"/>
|
||||
<relationship kind="action" name="showWIthLabelAnnularDeterminate:"/>
|
||||
<relationship kind="action" name="showWithColor:"/>
|
||||
<relationship kind="action" name="showWithCustomView:"/>
|
||||
<relationship kind="action" name="showWithDetailsLabel:"/>
|
||||
<relationship kind="action" name="showWithGradient:"/>
|
||||
<relationship kind="action" name="showWithLabel:"/>
|
||||
<relationship kind="action" name="showWithLabelDeterminate:"/>
|
||||
<relationship kind="action" name="showWithLabelDeterminateHorizontalBar:"/>
|
||||
<relationship kind="action" name="showWithLabelMixed:"/>
|
||||
</relationships>
|
||||
</class>
|
||||
</classes>
|
||||
</document>
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'MBProgressHUD' target in the 'MBProgressHUD' project
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_3_0
|
||||
#warning "This project uses features only available in iOS SDK 3.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// MBProgressHUD.h
|
||||
// Version 0.6
|
||||
// Version 0.8
|
||||
// Created by Matej Bukovinski on 2.4.09.
|
||||
//
|
||||
|
||||
@@ -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 */
|
||||
@@ -56,6 +58,14 @@ typedef enum {
|
||||
} 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
|
||||
@@ -111,7 +121,7 @@ typedef void (^MBProgressHUDCompletionBlock)();
|
||||
* @see hideHUDForView:animated:
|
||||
* @see animationType
|
||||
*/
|
||||
+ (MBProgressHUD *)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
|
||||
+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
* Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
|
||||
@@ -134,7 +144,7 @@ typedef void (^MBProgressHUDCompletionBlock)();
|
||||
* 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;
|
||||
@@ -145,7 +155,7 @@ typedef void (^MBProgressHUDCompletionBlock)();
|
||||
* @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.
|
||||
@@ -227,21 +237,21 @@ typedef void (^MBProgressHUDCompletionBlock)();
|
||||
/**
|
||||
* Shows the HUD while a block is executing on a background queue, then hides the HUD.
|
||||
*
|
||||
* @see showAnimated:whileExecutingBlock:onQueue:completion:
|
||||
* @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:completion:
|
||||
* @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:completion:
|
||||
* @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
|
||||
*/
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;
|
||||
|
||||
@@ -441,3 +451,34 @@ typedef void (^MBProgressHUDCompletionBlock)();
|
||||
@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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// MBProgressHUD.m
|
||||
// Version 0.6
|
||||
// Version 0.8
|
||||
// Created by Matej Bukovinski on 2.4.09.
|
||||
//
|
||||
|
||||
@@ -23,6 +23,22 @@
|
||||
#define MBLabelAlignmentCenter UITextAlignmentCenter
|
||||
#endif
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
|
||||
#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \
|
||||
sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero;
|
||||
#else
|
||||
#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero;
|
||||
#endif
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
|
||||
#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
|
||||
boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \
|
||||
attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero;
|
||||
#else
|
||||
#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
|
||||
sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero;
|
||||
#endif
|
||||
|
||||
|
||||
static const CGFloat kPadding = 4.f;
|
||||
static const CGFloat kLabelFontSize = 16.f;
|
||||
@@ -104,15 +120,15 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
|
||||
#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];
|
||||
@@ -122,7 +138,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];
|
||||
@@ -130,11 +146,10 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
return [huds count];
|
||||
}
|
||||
|
||||
+ (MBProgressHUD *)HUDForView:(UIView *)view {
|
||||
Class hudClass = [MBProgressHUD class];
|
||||
+ (MB_INSTANCETYPE)HUDForView:(UIView *)view {
|
||||
NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator];
|
||||
for (UIView *subview in subviewsEnum) {
|
||||
if ([subview isKindOfClass:hudClass]) {
|
||||
if ([subview isKindOfClass:self]) {
|
||||
return (MBProgressHUD *)subview;
|
||||
}
|
||||
}
|
||||
@@ -144,9 +159,8 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
+ (NSArray *)allHUDsForView:(UIView *)view {
|
||||
NSMutableArray *huds = [NSMutableArray array];
|
||||
NSArray *subviews = view.subviews;
|
||||
Class hudClass = [MBProgressHUD class];
|
||||
for (UIView *aView in subviews) {
|
||||
if ([aView isKindOfClass:hudClass]) {
|
||||
if ([aView isKindOfClass:self]) {
|
||||
[huds addObject:aView];
|
||||
}
|
||||
}
|
||||
@@ -345,8 +359,8 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
- (void)done {
|
||||
isFinished = YES;
|
||||
self.alpha = 0.0f;
|
||||
if ([delegate respondsToSelector:@selector(hudWasHidden:)]) {
|
||||
[delegate performSelector:@selector(hudWasHidden:) withObject:self];
|
||||
if (removeFromSuperViewOnHide) {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
if (self.completionBlock) {
|
||||
@@ -354,8 +368,8 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
self.completionBlock = NULL;
|
||||
}
|
||||
#endif
|
||||
if (removeFromSuperViewOnHide) {
|
||||
[self removeFromSuperview];
|
||||
if ([delegate respondsToSelector:@selector(hudWasHidden:)]) {
|
||||
[delegate performSelector:@selector(hudWasHidden:) withObject:self];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +432,6 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (void)cleanUp {
|
||||
taskInProgress = NO;
|
||||
self.indicator = nil;
|
||||
#if !__has_feature(objc_arc)
|
||||
[targetForExecution release];
|
||||
[objectForExecution release];
|
||||
@@ -468,6 +481,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
|
||||
@@ -510,7 +529,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
totalSize.width = MAX(totalSize.width, indicatorF.size.width);
|
||||
totalSize.height += indicatorF.size.height;
|
||||
|
||||
CGSize labelSize = [label.text sizeWithFont:label.font];
|
||||
CGSize labelSize = MB_TEXTSIZE(label.text, label.font);
|
||||
labelSize.width = MIN(labelSize.width, maxWidth);
|
||||
totalSize.width = MAX(totalSize.width, labelSize.width);
|
||||
totalSize.height += labelSize.height;
|
||||
@@ -520,8 +539,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
|
||||
CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin;
|
||||
CGSize maxSize = CGSizeMake(maxWidth, remainingHeight);
|
||||
CGSize detailsLabelSize = [detailsLabel.text sizeWithFont:detailsLabel.font
|
||||
constrainedToSize:maxSize lineBreakMode:detailsLabel.lineBreakMode];
|
||||
CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode);
|
||||
totalSize.width = MAX(totalSize.width, detailsLabelSize.width);
|
||||
totalSize.height += detailsLabelSize.height;
|
||||
if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) {
|
||||
@@ -734,35 +752,7 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
@end
|
||||
|
||||
|
||||
@implementation MBRoundProgressView {
|
||||
float _progress;
|
||||
BOOL _annular;
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
@synthesize progressTintColor = _progressTintColor;
|
||||
@synthesize backgroundTintColor = _backgroundTintColor;
|
||||
|
||||
#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
|
||||
|
||||
@@ -857,7 +847,158 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
|
||||
- (NSArray *)observableKeypaths {
|
||||
return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", nil];
|
||||
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 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "MBProgressHUD"
|
||||
s.version = "0.6"
|
||||
s.version = "0.8"
|
||||
s.summary = "An iOS activity indicator view."
|
||||
s.description = <<-DESC
|
||||
MBProgressHUD is an iOS drop-in class that displays a translucent HUD
|
||||
|
||||
@@ -7,14 +7,28 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1315DD7617804CBC0032507D /* MBProgressHUD.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; };
|
||||
D286A74D1518C70F00E13FB8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A74C1518C70F00E13FB8 /* Foundation.framework */; };
|
||||
D286A7531518C70F00E13FB8 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; };
|
||||
D286A75E1518C89600E13FB8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A75D1518C89600E13FB8 /* UIKit.framework */; };
|
||||
D286A76F1518CAAD00E13FB8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */; };
|
||||
D286A7851518CBEE00E13FB8 /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
1315DD7517804C970032507D /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/${PRODUCT_NAME}";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
1315DD7617804CBC0032507D /* MBProgressHUD.h in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1315DD73178045000032507D /* MBProgressHUD-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MBProgressHUD-Prefix.pch"; sourceTree = SOURCE_ROOT; };
|
||||
D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMBProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D286A74C1518C70F00E13FB8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D286A7511518C70F00E13FB8 /* MBProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = SOURCE_ROOT; };
|
||||
@@ -28,15 +42,23 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D286A76F1518CAAD00E13FB8 /* CoreGraphics.framework in Frameworks */,
|
||||
D286A75E1518C89600E13FB8 /* UIKit.framework in Frameworks */,
|
||||
D286A74D1518C70F00E13FB8 /* Foundation.framework in Frameworks */,
|
||||
D286A76F1518CAAD00E13FB8 /* CoreGraphics.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1315DD72178044770032507D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1315DD73178045000032507D /* MBProgressHUD-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D286A73E1518C70E00E13FB8 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -57,9 +79,9 @@
|
||||
D286A74B1518C70F00E13FB8 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */,
|
||||
D286A75D1518C89600E13FB8 /* UIKit.framework */,
|
||||
D286A74C1518C70F00E13FB8 /* Foundation.framework */,
|
||||
D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -69,23 +91,13 @@
|
||||
children = (
|
||||
D286A7511518C70F00E13FB8 /* MBProgressHUD.h */,
|
||||
D286A7521518C70F00E13FB8 /* MBProgressHUD.m */,
|
||||
1315DD72178044770032507D /* Supporting Files */,
|
||||
);
|
||||
path = MBProgressHUD;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D286A7471518C70F00E13FB8 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D286A7851518CBEE00E13FB8 /* MBProgressHUD.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D286A7481518C70F00E13FB8 /* MBProgressHUD */ = {
|
||||
isa = PBXNativeTarget;
|
||||
@@ -93,7 +105,7 @@
|
||||
buildPhases = (
|
||||
D286A7451518C70F00E13FB8 /* Sources */,
|
||||
D286A7461518C70F00E13FB8 /* Frameworks */,
|
||||
D286A7471518C70F00E13FB8 /* Headers */,
|
||||
1315DD7517804C970032507D /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -148,7 +160,10 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -175,7 +190,10 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -195,12 +213,10 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DSTROOT = /tmp/MBProgressHUD.dst;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PUBLIC_HEADERS_FOLDER_PATH = "include/$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -209,12 +225,10 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DSTROOT = /tmp/MBProgressHUD.dst;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
GCC_PREFIX_HEADER = "";
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch";
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(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 = "0500"
|
||||
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>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>56AFB412-8D27-4BA2-8013-D55F9BFC45C2</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>MBProgressHUD</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>EC408792-857F-4597-A622-50F7402BBD62</key>
|
||||
<string>ssh://github.com/matej/MBProgressHUD.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>MBProgressHUD.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>EC408792-857F-4597-A622-50F7402BBD62</key>
|
||||
<string>..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>ssh://github.com/matej/MBProgressHUD.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>EC408792-857F-4597-A622-50F7402BBD62</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>EC408792-857F-4597-A622-50F7402BBD62</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>MBProgressHUD</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,4 +1,4 @@
|
||||
# MBProgressHUD
|
||||
# MBProgressHUD [](https://travis-ci.org/matej/MBProgressHUD)
|
||||
|
||||
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.
|
||||
|
||||
@@ -26,7 +26,7 @@ You will need LLVM 3.0 or later in order to build MBProgressHUD.
|
||||
|
||||
[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project.
|
||||
|
||||
1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.6'`
|
||||
1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.8'`
|
||||
2. Install the pod(s) by running `pod install`.
|
||||
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
|
||||
|
||||
@@ -35,7 +35,7 @@ You will need LLVM 3.0 or later in order to build MBProgressHUD.
|
||||
Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.
|
||||
|
||||
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, than 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.
|
||||
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"`.
|
||||
|
||||
### Static library
|
||||
@@ -43,7 +43,7 @@ Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` s
|
||||
You can also add MBProgressHUD as a static library to your project or workspace.
|
||||
|
||||
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, than drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the "Product Navigator view").
|
||||
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>`.
|
||||
|
||||
@@ -98,69 +98,4 @@ This code is distributed under the terms and conditions of the [MIT license](LIC
|
||||
|
||||
## Change-log
|
||||
|
||||
**Version 0.6** @ 13.03.13
|
||||
|
||||
- Full cocoapods support.
|
||||
- Static library integration option.
|
||||
- Improved blocks support.
|
||||
- Bezel color.
|
||||
- Demo app fixes (iOS 6).
|
||||
- Various bug-fixes and enhancements.
|
||||
|
||||
**Version 0.5** @ 22.03.12
|
||||
|
||||
- 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).
|
||||
|
||||
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 bug-fixes.
|
||||
|
||||
**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 [wiki](https://github.com/matej/MBProgressHUD/wiki/Change-log).
|
||||
|
||||