296 Commits

Author SHA1 Message Date
Matej Bukovinski ac7a7a8c5e Version bump to 0.9.1. 2015-03-06 08:58:12 +01:00
Matej Bukovinski 61addd2405 Cancel any scheduled hideDelayed: calls. 2015-03-06 08:50:42 +01:00
Alsey Coleman Miller cca92d1156 updated enum to NS_ENUM
Better practice and Swift support
2015-03-06 08:29:16 +01:00
Matej Bukovinski 5603383161 Merge branch 'tests' 2015-03-06 08:14:52 +01:00
Matej Bukovinski fceb09cc8b Merge branch 'master' of github.com:jdg/MBProgressHUD 2015-03-06 07:47:39 +01:00
Matej Bukovinski dc534dcb31 Alternative solution for the orientation discrepancy between iOS 7 and iOS 8.
Also avoid sharedApplication usage on iOS 8+ targets.
2015-03-06 07:46:57 +01:00
Matej Bukovinski ab71afed92 Added a note regarding developer tools 2015-03-06 07:28:35 +01:00
Matej Bukovinski a9f8fe88eb Update README.mdown
Switched back to the official build indicator (now in vector form).
2015-02-08 15:29:12 +01:00
Matej Bukovinski 5612808fb1 Update README.mdown
Higher quality build shield.
2015-02-08 15:27:17 +01:00
Matej Bukovinski fe388ef956 Removed a nonexistent test target from the test scheme. 2015-02-08 15:22:52 +01:00
Matej Bukovinski f6689c1c26 Added a sample test. 2015-02-08 15:16:17 +01:00
Matej Bukovinski 69c58ea278 Don't compare apples and oranges. 2015-02-05 08:20:07 +01:00
Matej Bukovinski 6033a0b1ad Fix color inconsistencies. 2015-02-05 07:59:15 +01:00
Matej Bukovinski 3ac3f787eb Merge branch 'master' of github.com:jdg/MBProgressHUD 2014-12-22 18:52:41 +01:00
Matej Bukovinski f75901d9b0 Merge pull request #61 from bcylin/master
Update outdated .travis.yml
2014-12-22 18:30:11 +01:00
Ben fddc5dbcdf Update .travis.yml 2014-12-23 01:10:07 +08:00
Jonathan George 28c44be413 Bring back inline with MateJ's fork 2014-11-03 07:54:28 -06:00
Jonathan George c938b0f0f7 Bump to v1.0, prep for release 2014-11-03 07:48:21 -06:00
Jonathan George 23023d7983 Release 0.10 with iOS8 support 2014-11-03 07:46:33 -06:00
Jonathan George f316d247ae Merge pull request #243 from epacces/fix/ios8/hudorientation
Fix/ios8/hudorientation
2014-11-03 07:42:04 -06:00
Eriprando Pacces f4aaad3906 Fixes issue #233
last and hopefully :) working attempt
2014-09-30 02:07:26 +01:00
Eriprando Pacces 2f44900d0d [BUG][iOS8]
- Fixes the incorrect HUD orientation on applications linked against an SDK < 8.0 running on iOS 8.x
Issue #233
2014-09-22 21:31:37 +01:00
Matej Bukovinski fc1903ff44 Basic iPad support for the demo. 2014-08-18 18:15:57 +02:00
Matej Bukovinski 2216078a1a Merge pull request #225 from Zyphrax/master
Set removeFromSuperViewOnHide to YES for convenience methods
2014-08-18 18:03:46 +02:00
Yvo van Beek cb56321f40 Set removeFromSuperViewOnHide to YES for convenience methods 2014-08-18 21:35:11 +10:00
Matej Bukovinski d9886df3ad Version bump. 2014-08-12 10:30:12 +02:00
Matej Bukovinski 7e0bda2f85 Merge branch 'runeb-master' 2014-08-12 10:27:22 +02:00
Matej Bukovinski b8ef4c4e58 Cleaned up activityIndicatorColor support. 2014-08-12 10:27:02 +02:00
Matej Bukovinski 2716a01b99 Merge branch 'master' of https://github.com/runeb/MBProgressHUD into runeb-master 2014-08-12 10:11:23 +02:00
Matej Bukovinski e368a8c243 Merge branch 'master' of github.com:jdg/MBProgressHUD
Conflicts:
	MBProgressHUD.m
2014-08-12 10:08:20 +02:00
Matej Bukovinski 59682eb65e Removed unnecessary method declarations. 2014-08-12 10:04:19 +02:00
Matej Bukovinski 7ed09decad Improved window rotation animation. 2014-08-12 10:04:19 +02:00
Matej Bukovinski 4b403a7d2a Cleaned up notification handling. 2014-08-12 10:04:19 +02:00
Paul Bramsen 0a15804a71 Use the proper notification for status bar did change 2014-08-12 10:04:19 +02:00
Matej Bukovinski 8eb3e881b9 Merge pull request #200 from gmirabito/master
Expose HUD bezel size as read only public property
2014-08-12 10:04:10 +02:00
Matej Bukovinski 4ad3584fee Merge pull request #211 from paulbramsen/master
Use the proper notification for status bar orientation change
2014-08-12 09:17:47 +02:00
Matej Bukovinski 4f8b21759a Freshened up the checkmark example. 2014-08-12 08:37:26 +02:00
Matej Bukovinski 83630b6198 Updated annular mode for iOS 7+. 2014-08-12 07:56:36 +02:00
Matej Bukovinski bd24a291d1 Removing broken yOffset. 2014-08-12 07:36:47 +02:00
Matej Bukovinski 8e56d3e347 Fixed rotation animation on iOS 8. 2014-08-12 07:28:22 +02:00
Matej Bukovinski 5fb0921dab Updated demo appearance. 2014-08-12 07:19:56 +02:00
Matej Bukovinski f0601bd900 Migrated to kCFCoreFoundationVersionNumber_iOS_8_0. 2014-08-12 06:57:03 +02:00
Matej Bukovinski 194c82c86b Clean up code style. 2014-08-12 06:51:46 +02:00
Matej Bukovinski 516554f1f9 Merge pull request #222 from bsuvorov/master
iOS8:  UIWindow rotation transformation is no longer required.
2014-08-12 06:48:23 +02:00
Boris Suvorov 06fdc08431 Because iOS8 window now rotates its subviews, we need
to skip rotation of the HUD when it is being added to the window.
Learn more here: https://devforums.apple.com/message/981103#981103
2014-08-11 18:08:53 -07:00
Matej Bukovinski 9cfed6bc39 Bumped the deployment target for Xcode 6 compatibility. 2014-07-24 09:28:16 +02:00
Paul Bramsen 4194dcf10a Use the proper notification for status bar did change 2014-06-26 16:53:08 -07:00
Matej Bukovinski 2d3561081b Added missing release calls in non-arc mode. Fixes #206 2014-05-28 10:27:15 +02:00
Matej Bukovinski 8800353105 Fixed spacing. 2014-05-28 10:25:04 +02:00
Matej Bukovinski 5918829642 Comment cleanup / fix. #201 2014-05-16 10:59:21 +02:00
Greg Mirabito 69b4f27895 Expose HUD bezel size as read only public property
We have a situation where we want to add a tap gesture recognizer to
the HUD for “tap to cancel” behavior. We want to ignore the tap gesture
if the tap did not occur within the bezel region of the HUD. By
exposing the ‘size’ property, we can determine if the tap location is
within the rectangle of the bezel.

Here is an example of code that processes a tap event that was added to
the HUD

-(void)tapReceived:(UITapGestureRecognizer *)recognizer{
    CGPoint loc = [recognizer locationInView:progress];

    CGFloat w = progress.size.width;
    CGFloat h = progress.size.height;
    CGFloat x = progress.center.x - w/2;
    CGFloat y = progress.center.y - h/2;
    CGRect progressRect = CGRectMake(x, y, w, h);

    //if the tap was within the HUD bezel, then react to it, ignore it
otherwise
    if(CGRectContainsPoint(progressRect, loc)){
        //do any actions here (cancel operation for example)
        [progress hide:YES];
    }else{
        //the tap location was not in the bezel region of the HUD so
igore it.
        return;
    }

}
2014-05-15 16:16:30 -04:00
Matej Bukovinski c13d794975 Merge pull request #199 from rivera-ernesto/add_suggested_warning_check
Add Xcode suggested GCC_WARN_64_TO_32_BIT_CONVERSION warning to Demo project
2014-05-13 08:36:57 +02:00
利辺羅エルネスト 913d8f37e5 Add Xcode suggested GCC_WARN_64_TO_32_BIT_CONVERSION warning to Demo project 2014-05-13 14:55:54 +09:00
Matej Bukovinski 130d31288e Merge pull request #192 from liuyaodong/patch-1
Canceling scheduled method calls inside `done`.
2014-02-25 15:14:20 +01:00
Liu Yaodong 307ca57a4c Update MBProgressHUD.m
Cancel scheduled task when -done called to fix memory issues.
2014-02-25 15:20:34 +08:00
Matej Bukovinski d775e8d985 Merge pull request #186 from holyman2k/master
fix arm 64 compiling error
2014-01-22 04:45:30 -08:00
Charlie Wu 7ffa6696c9 fix arm 64 compiling error 2014-01-20 09:53:02 +11:00
Matej Bukovinski 0fffff8031 Replacing roundf() with round() from thmath.h.
Improves 64 bit compatibility. See http://stackoverflow.com/questions/7694948/cgfloat-round-floor-abs-and-32-64-bit-precision
2013-11-14 12:29:11 +01:00
Matej Bukovinski 322af011f6 Removing the workspace .xccheckout file.
This file does not make much sense for this project see http://stackoverflow.com/questions/18340453/should-xccheckout-files-in-xcode5-be-ignored-under-vcs
2013-11-14 12:25:22 +01:00
Matej Bukovinski e879be1d22 Merge pull request #169 from nanoant/patch/fix-xcode5-warnings
Patch/fix xcode5 warnings
2013-10-30 03:14:17 -07:00
Adam Strzelecki 65ecd91445 Remove executable flags from source files 2013-10-16 17:03:28 +02:00
Adam Strzelecki da3d84ea0c Fix: Xcode 5 recommended settings
* Select architectures based on deployment target
* Use current architecture for Debug build
* Enable recommended warnings
2013-10-16 16:59:22 +02:00
Rune Botten 1f1aa50bb4 Conditionally declare the property depending on iOS target version 2013-10-04 14:45:12 +02:00
Rune Botten 7c90731626 Add dynamic property for the color of the UIActivityIndicatorView on iOS >= 5 2013-10-04 14:13:53 +02:00
Matej Bukovinski bb4a35b008 Merge pull request #167 from Club15CC/15cc-additions
Adds roundedCorner property
2013-10-02 06:33:14 -07:00
Hari Karam Singh c56e789aec Adds roundedCorner property 2013-10-01 13:14:52 +01:00
Matej Bukovinski c8e51ec1ef Added xccheckout to gitignore. 2013-10-01 10:47:15 +02:00
Matej Bukovinski a5d34f1aac Merge pull request #50 from percysnoodle/label_colors
Add labelColor and detailLabelColor to control label colours
2013-10-01 01:33:26 -07:00
Matej Bukovinski 8e0aed0409 Match the hud frame (not bounds) to the superview bounds. 2013-09-29 21:14:36 +02:00
Matej Bukovinski 7c8ef3d5f1 Version bump to 0.8. 2013-09-19 10:43:42 +02:00
Matej Bukovinski b157ecb0ac Fixed threading bug in the myMixedTask demo. 2013-09-19 10:41:25 +02:00
Matej Bukovinski fdd147f3c2 Calling hudWasHidden: at the end of the done method. 2013-09-19 10:19:23 +02:00
Matej Bukovinski fa5cc8e4ec Changed the URL sample file and improved expectedLength handling. 2013-09-19 10:09:39 +02:00
Matej Bukovinski 2894a431bd Merge branch 'master' of github.com:jdg/MBProgressHUD 2013-09-19 09:43:19 +02:00
Matej Bukovinski 61e8f0ad13 Merge pull request #158 from lono175/master
Fix for a possible memory leak.
2013-09-19 00:42:59 -07:00
Matej Bukovinski ed4f0d0ec1 Merge branch 'master' of github.com:jdg/MBProgressHUD 2013-09-19 09:31:40 +02:00
Matej Bukovinski 5c879487e2 Merge pull request #163 from jdg/iOS7
I os7 fixes
2013-09-19 00:30:47 -07:00
Lono d4581b29f3 - fix a possible memory leak 2013-08-22 22:53:31 +08:00
Simon Booth 90c1ffc412 Add labelColor and detailLabelColor to control label colours 2013-07-19 08:07:46 +01:00
Matej Bukovinski fc51985417 Bumped cocoapods instructions to version to 0.7. 2013-07-02 11:35:36 +02:00
Matej Bukovinski e7b749355c Forcing zero label height when text is set to @“”. 2013-07-01 19:35:35 +02:00
Matej Bukovinski fd37963b08 Removed .gitattributes. 2013-06-30 23:11:23 +02:00
Matej Bukovinski c7b897895d Removed .gitattributes. 2013-06-30 23:10:18 +02:00
Matej Bukovinski a50f7a36a4 Using iOS 7 text size methods, when deploying to iOS 7+.
- circumvents deprication warnings
2013-06-30 21:03:31 +02:00
Matej Bukovinski 355651dd21 Added new Xcode shareddata. 2013-06-30 20:24:59 +02:00
Matej Bukovinski 6beae8260e Added iOS 7 resources to the demo project.
- new icon size (+ missing existing icon sizes)
- new launch images (+ updated iOS 6 images)
- a convenient screenshot mode setting
2013-06-30 20:24:35 +02:00
Matej Bukovinski b68750e3a0 Performed suggest Xcode project modernization. 2013-06-30 19:42:05 +02:00
Andrew Vyazovoy febda3cb4b Little typo fix. 2013-06-30 14:13:51 +02:00
Andrew Vyazovoy 21020cdc4e Applied this recommendations: https://developer.apple.com/library/ios/#technotes/iOSStaticLibraries/Introduction.html
Added .pch file speed up compilation time.
2013-06-30 14:13:51 +02:00
Matej Bukovinski 5565c64f89 Merge pull request #146 from Vyazovoy/feature/fix_header_place
Modern static library configuration rules
2013-06-30 05:01:18 -07:00
Andrew Vyazovoy 3e095ae0b9 Little typo fix. 2013-06-30 15:42:32 +04:00
Andrew Vyazovoy b0f1f66148 Applied this recommendations: https://developer.apple.com/library/ios/#technotes/iOSStaticLibraries/Introduction.html
Added .pch file speed up compilation time.
2013-06-30 15:41:47 +04:00
Matej Bukovinski 1761e41355 Version bump to 0.7. 2013-06-25 14:22:30 +02:00
Matej Bukovinski 83c7ce6aae Migrated the change log to the wiki. 2013-06-25 14:29:29 +03:00
Matej Bukovinski a25be7e1e8 Added a few pragma declarations to MBBarProgressView. 2013-06-25 13:17:44 +02:00
Matej Bukovinski 2f11106a92 Migrated some property overrides to KVO on MBRoundProgressView. 2013-06-25 13:16:54 +02:00
Matej Bukovinski 64a3f8ac8b Fixed the determinate demo. 2013-06-25 13:16:02 +02:00
Matej Bukovinski 6c4bd53249 Cleanup of the new horizontal bar functionality.
- added class prefix to the bar class, to minimize the chance for namespace collisions
 - exposed and documented the MBBarProgressView interface
 - removed some non-crucial methods to simplify the API
 - adjusted the default values for some attributers
 - cleaned up the code style, so it matches the rest of the class
 - added proper ARC macros
 - using KVO instead of accessor overrides for UI update triggering
2013-06-25 13:13:12 +02:00
Matej Bukovinski d3c6f30b00 Extended the demo with an example for the new horizontal bar mode. 2013-06-25 12:41:52 +02:00
Matej Bukovinski 8a84e57ede Merge pull request #142 from markd2/master
Quiet warning in non-ARC mode
2013-06-25 03:27:25 -07:00
markd2 427a8ababa Added super dealloc for FlatProgressView, no-ARC mode 2013-06-21 10:02:45 -04:00
Jonathan George c45743cc20 Merge pull request #139 from jjxtra/master
Add horizontal progress bar
2013-06-19 13:30:47 -07:00
Jeff Johnson e726947f61 Another ARC tweak 2013-05-20 15:53:25 -06:00
Jeff Johnson c84bea7b7b Add in horizontal progress bar 2013-05-20 15:51:39 -06:00
Matej Bukovinski c24d6e7fcd Merge pull request #137 from cbeninati/patch-1
fixed typos "than" to "then"
2013-05-13 22:11:51 -07:00
cbeninati f53fbdc0af fixed typos "than" to "then" 2013-05-13 17:53:49 -05:00
Matej Bukovinski aa9ecd55da Merge pull request #135 from matej/master
Travis integration.
2013-04-28 23:43:15 -07:00
Matej Bukovinski 980ca2a73f Fixed readme typo. 2013-04-28 21:38:55 +03:00
Matej Bukovinski 7f1f919937 Added build status to the readme. 2013-04-28 21:36:36 +03:00
Matej Bukovinski 7d8d0ddba4 Published schemes. 2013-04-28 20:32:05 +02:00
Matej Bukovinski a082c2f63d Added .travis.yml. 2013-04-28 20:20:48 +02:00
Matej Bukovinski 19f91d283b Slight macro formatting cleanup. 2013-03-18 10:25:56 +01:00
Matej Bukovinski 50f23054b1 Merge pull request #125 from mrackwitz/master
Improved subclassing
2013-03-18 02:23:20 -07:00
Marius Rackwitz ed8f872664 Added macro for compilers which doesn't support instancetype 2013-03-17 00:07:27 +01:00
Matej Bukovinski 2065aa5c0b A few documentation fixes. 2013-03-13 12:07:00 +01:00
Matej Bukovinski bd3fee3df5 Removed screenshot entries from the podspec. 2013-03-13 11:44:08 +01:00
Matej Bukovinski ffaa27fb9d Version bump and change log update. 2013-03-13 11:33:42 +01:00
Matej Bukovinski 2cdf32f1ae Merge branch 'cocoapods' 2013-03-13 11:22:05 +01:00
Matej Bukovinski bc1d7f9016 Added podspec for version 0.6. 2013-03-13 11:20:48 +01:00
Matej Bukovinski 74ad80820f README cleanup and cocoapods instructions. 2013-03-13 11:18:53 +01:00
Matej Bukovinski 901d5c44d2 Merge pull request #109 from dnstevenson/master
Fixed example in Readme
2013-03-13 02:44:56 -07:00
Matej Bukovinski c05664b882 Merge pull request #112 from coryallegory/master
MBLabelAlignmentCenter risk of being defined multiple times
2013-03-13 02:42:05 -07:00
Matej Bukovinski 5ac34dd973 Updated license and added a LICENSE file. 2013-03-12 20:37:00 +01:00
Matej Bukovinski 4eda67f5d9 Performed recommended Xcode 4.6 project updates. 2013-03-12 20:26:31 +01:00
Matej Bukovinski 4236564c5a Additional note regarding the Static library integration. 2013-03-12 20:23:26 +01:00
Marius Rackwitz 973aa1b268 Replaced fix class type through instancetype and used self in static methods instead of fixed class reference to enable improved subclassing 2013-03-12 18:00:01 +01:00
Matej Bukovinski ff3f08ec33 Merge pull request #44 from tewha/patch-5
Fix typo in MBProgressHUD
2013-02-06 02:15:01 -08:00
Steven Fisher f3dd4fd0bc Fix typo in MBProgressHUD
Typo (or aggressive find/replace) caused an "x-axis" (correct)
and "y-ayis" (wot?).
2013-02-05 15:07:08 -08:00
Matej Bukovinski 09284ec788 Moved initial setTransformForCurrentOrientation check to didMoveToSuperview. fixes #102 2013-01-29 11:48:24 +01:00
Matej Bukovinski 283cd62ae1 Performed recommended Xcode 4.6 project updates. 2013-01-29 11:47:36 +01:00
Matej Bukovinski 70614d424f Merge pull request #43 from tewha/patch-4
Typo fixes
2013-01-07 05:58:24 -08:00
Matej Bukovinski a6d89f16d3 Merge pull request #42 from tewha/patch-3
Typo fix in readme
2013-01-07 05:57:44 -08:00
Steven Fisher d7ba79de74 Typo fixes
Various typos in header comments.
2012-12-20 18:04:21 -08:00
Steven Fisher e22fcf318d Typo fix in readme
"setters are hoverer considered" should be "setters are however considered"
2012-12-20 18:02:14 -08:00
Cory Metcalfe c49b6cbcf7 MBLabelAlignmentCenter doesn't need to be in header, could end up with multi-declaration of value 2012-12-12 15:09:00 -06:00
dnstevenson 1204df15e7 Update README.mdown
Properly hides the HUD at completion.
2012-12-05 11:34:24 -07:00
Greg Pascale 30814ccfa5 don't set alpha to 0 at beginning of fade out animation
Conflicts:
	MBProgressHUD.m
2012-11-30 13:52:57 +01:00
Matej Bukovinski 98c85444eb Added color support to MBRoundProgressView. 2012-11-23 09:28:38 +01:00
Matej Bukovinski 48a98d393e Merge branch 'master' of github.com:matej/MBProgressHUD 2012-11-17 09:05:40 +01:00
Matej Bukovinski b9ce4bfdcc Using a reverse enumerator, rather than a for loop for subview enumeration. 2012-11-17 09:05:14 +01:00
Matej Bukovinski 0c579a9010 Merge pull request #103 from dontangg/HUDForView-enhancement
HudForView: performance enhancement
2012-11-16 23:45:35 -08:00
Don Wilson 7dffd6ce5b Start looking for the HUD at the end of the subviews array
Since we add it to the end of the array when it is created, that's where
we're most likely to find it again.
2012-11-16 14:18:07 -07:00
Don Wilson 271252c192 Return a HUD as soon as one is found in HUDForView: 2012-11-16 13:53:27 -07:00
Matej Bukovinski 0151c89961 Some additional readme tweaks. 2012-11-15 15:41:15 +01:00
Matej Bukovinski f051f095cc New integration instructions and some readme cleanup. 2012-11-15 15:41:15 +01:00
Matej Bukovinski 30d1919373 Making sure that public headers get copied into include/MBProgressHUD. 2012-11-15 15:41:15 +01:00
Matej Bukovinski 197fa72df2 Some additional readme tweaks. 2012-11-15 15:40:00 +01:00
Matej Bukovinski b5fac1cddf New integration instructions and some readme cleanup. 2012-11-15 15:29:53 +01:00
Matej Bukovinski 696108763e Making sure that public headers get copied into include/MBProgressHUD. 2012-11-15 15:01:15 +01:00
Matej Bukovinski 3a00e68d24 Merge pull request #95 from yosit/master
make the interface conform to the GCC LLVM compiler. atomic keyword is assumed to be the default for property.
2012-11-13 09:38:39 -08:00
Matej Bukovinski f1a30d2784 Backward compatible fix for UITextAlignmentCenter deprecation in iOS 6. 2012-11-13 18:27:48 +01:00
Matej Bukovinski 255de853ee Merge branch 'master' of github.com:jdg/MBProgressHUD 2012-11-13 18:03:20 +01:00
Yosi Taguri dd23be89a7 make the interface conform to the GCC LLVM compiler. atomic keyword is assumed to be the default for property.
http://stackoverflow.com/questions/8288864/property-is-assumed-atomic-by-default
2012-10-18 09:43:20 +02:00
Matej Bukovinski d238203406 Setting rootViewController in demo app. 2012-10-08 08:17:19 +02:00
Matej Bukovinski 7a43c05c46 Added iPhone 5 default.png. 2012-10-08 08:17:19 +02:00
Matej Bukovinski 46cdd1bf7f Fixed button autoresizing in the demo project. 2012-10-08 08:17:19 +02:00
Matej Bukovinski cb9db00187 Fixed demo project window size on iOS6. 2012-10-08 08:17:19 +02:00
Matej Bukovinski 1543526647 Setting rootViewController in demo app. 2012-10-08 08:16:42 +02:00
briansoule 0b40a0629b Update README.mdown
changed than => then
http://bit.ly/qN1nt4
2012-10-08 08:16:42 +02:00
Matej Bukovinski 4b9eb5d95f Added iPhone 5 default.png. 2012-09-25 13:40:23 +02:00
Matej Bukovinski a02e54573e Fixed button autoresizing in the demo project. 2012-09-25 13:38:19 +02:00
Matej Bukovinski 716925f14d Fixed demo project window size on iOS6. 2012-09-25 12:58:10 +02:00
Ned Ruggeri a6059f380d Set taskInProgres when beginning to execute a block
Setting graceTime and using block method caused HUD to never appear.
2012-09-12 10:17:41 +02:00
Matej Bukovinski 43771afb35 Merge pull request #84 from briansoule/master
Super important update
2012-09-12 01:09:32 -07:00
Matej Bukovinski fa29deb418 Merge branch 'master' of github.com:jdg/MBProgressHUD 2012-09-12 09:59:17 +02:00
Matej Bukovinski a65593d3a0 Fixed a possible retain cycle under ARC. closes #85 2012-09-12 09:57:54 +02:00
Matej Bukovinski d4238ec4f1 Merge pull request #39 from stig/master
Add AppCode folder to .gitignore
2012-09-06 01:09:14 -07:00
briansoule 98833ab73c Update README.mdown
changed than => then
http://bit.ly/qN1nt4
2012-08-31 13:19:44 -05:00
Stig Brautaset b5f5827a9e Added AppCode folder to .gitignore 2012-08-28 00:17:42 +01:00
Matej Bukovinski 34e95db3bc Merge pull request #83 from ruggeri/master
Setting graceTime and using block method caused HUD to never appear
2012-08-27 00:03:41 -07:00
Matej Bukovinski 4b96571371 Merge pull request #32 from mattrubin/zoom-in-out
Added zoom in and zoom out animations
2012-08-26 23:58:45 -07:00
Matej Bukovinski d6533e6992 Merge pull request #37 from hsoi/master
Compiler warnings cleanup
2012-08-26 23:56:41 -07:00
Ned Ruggeri 93fff466fe Set taskInProgres when beginning to execute a block
Setting graceTime and using block method caused HUD to never appear.
2012-08-25 15:52:27 -07:00
John C. Daub f8f1136bec Explicitly declare properties as strong, to be consistent with the rest of the code and suppress the "property is assumed atomic by default" warning. 2012-08-25 09:47:11 -05:00
John C. Daub d8e7c5139d Merge branch 'master' of https://github.com/matej/MBProgressHUD 2012-08-18 04:44:08 -05:00
Matej Bukovinski 262aea3514 Updated the demo project to use the new color property. 2012-08-07 08:38:31 +02:00
Matej Bukovinski 30f7fb60fa Using MB_STRONG instead of retain for the color property. 2012-08-07 08:36:42 +02:00
Matej Bukovinski c0548d0dfd Merge pull request #78 from johnkdoe/xolaware_drawing_fixes
Xolaware drawing fixes
2012-08-06 23:33:33 -07:00
Kirk Beitz 06d5bf88b9 use UIGraphicsPushContext() & UIGraphicsPopContext() to preserve caller graphics context w.r.t. items this drawRect: may set 2012-08-04 21:53:03 -07:00
Kirk Beitz 0ed184fc29 use UIColor for the color property rather than CGColorRef; makes for easier use of UIKit UIColor, and prevents ARC auto-released UIColor from being gone by the time the reference occurs 2012-08-04 21:32:20 -07:00
Matt Rubin 7279a44eee Keep support for MBProgressHUDAnimationZoom 2012-07-11 14:06:00 -07:00
Matt Rubin 5b42b0fc86 Added zoom in and zoom out animations 2012-07-11 13:28:53 -07:00
Matej Bukovinski 1d94c3b644 Added a missing delegate assignment in the demo project. 2012-07-11 10:37:50 +02:00
Matej Bukovinski 1f0dbc5638 Added missing release. 2012-07-10 20:02:26 +02:00
Matej Bukovinski 02f1e96f66 Merge pull request #75 from matej/master
Blocks API
2012-07-09 06:46:46 -07:00
Matej Bukovinski 455b692e8e Merge branch 'master' of github.com:jdg/MBProgressHUD
Conflicts:
	MBProgressHUD.h
	README.mdown
2012-07-09 15:46:06 +02:00
Matej Bukovinski 745ce2e13f Improved blocks support. 2012-07-05 12:28:28 +02:00
Angelina Fabbro 6bba10e7ec Add colored HUD to demo 2012-07-05 11:21:38 +02:00
Matej Bukovinski d1d331a77a Merge commit '47234d832d8e6c783a0ff11d9f61a8313df51527' 2012-07-05 11:21:22 +02:00
Matej Bukovinski c01faa7a9a Merge pull request #28 from oliland/master
Fixed typo in README
2012-07-05 02:02:27 -07:00
Angelina Fabbro 47234d832d Fix comment typo 2012-07-02 00:30:06 -07:00
Angelina Fabbro f340a05580 A more colorful HUD 2012-07-02 00:28:44 -07:00
Angelina Fabbro e9644ed1f5 Fix incorrect property description 2012-07-01 23:58:29 -07:00
Angelina Fabbro 1e8c78dcbc Update demo to reflect new blocks code 2012-07-01 23:56:50 -07:00
Angelina Fabbro a16758efe5 Blocks 2012-07-01 23:50:27 -07:00
John C. Daub 51284b1268 Quiet compiler warnings. 2012-06-17 18:06:55 -05:00
Oli Kingshott 647f4f3b93 Fixed typo 2012-05-30 23:55:02 +02:00
Matej Bukovinski 3d5c3cc993 Merge pull request #69 from matej/master
Ivar shadowing and a layout fix
2012-05-07 10:18:56 -07:00
Matej Bukovinski 1321c0b8e3 Merge pull request #27 from cbowns/master~
Fix compiler warnings: disambiguate a shadowed ivar (view vs. aView)
2012-04-27 03:07:13 -07:00
Christopher Bowns e55b47a509 Fix compiler warnings: disambiguate a shadowed ivar (view vs. aView) 2012-04-26 16:50:24 -07:00
Matej Bukovinski 1bf46c3ea6 Making sure the HUD always covers the parent view. 2012-04-24 15:50:56 +02:00
Matej Bukovinski 4ba6e7f524 Removed references to "Convenience constructor" as this more commonly refers to a class method that returns an autoreleased object. 2012-04-10 19:05:38 +03:00
Matej Bukovinski 0c83edd0ca Update README.mdown 2012-03-30 22:21:25 +03:00
Matej Bukovinski dd0e474624 Updated README code language. 2012-03-28 16:03:17 +02:00
Matej Bukovinski 51b883d18a Added another example to the readme. 2012-03-28 11:27:45 +02:00
Matej Bukovinski 9b0d99b9bd Fixed spelling. 2012-03-28 10:25:04 +02:00
Matej Bukovinski 7aa3f64d64 Added some additional notes to the readme. 2012-03-28 10:22:41 +02:00
Matej Bukovinski aad2c4e9f8 Merge pull request #63 from mattjgalloway/master
Fix header file comments
2012-03-28 00:01:22 -07:00
Matt Galloway 4dedea8517 Fix comments
This fixes some of the comments for grammar & spelling.
2012-03-27 21:24:14 +01:00
Matt Galloway 6b2d1fce69 Remove reference to NSAutoreleasePool
NSAutoreleasePool has gone, replaced by @autoreleasepool. This removes
NSAutoreleasePool from the comment incase anyone gets confused in
future.
2012-03-27 21:23:49 +01:00
Matej Bukovinski 4af17598a5 Major code rewrite / cleanup. closes #56 #60
- MBProgressHUD now requires LLVM 3+

- instance variables moved to the class implementation or removed (using synthesized instance vars)
- using KVO instead of custom accessors
- completely rewritten layout and UI buildup code
- more concise arc conditionals
- added MBProgressHUDModeText (+ example)
- various documentation fixes
- migrated to @autoreleasepool
- general source code cleanup and restructuring
- removed deprecated delegate callback
- version bump to 5.0
2012-03-22 15:41:55 +01:00
Matej Bukovinski caf39807f9 Fixed Annular determinate mode button resizing. 2012-03-22 10:53:07 +01:00
Matej Bukovinski 664ecad7d7 Indentation consistency fixes - this project uses tabs. #56 2012-03-20 15:57:58 +01:00
Matej Bukovinski 45b303c67b Library project and workspace added. closes #57
- added missing framework imports
- added a short note regarding the static library option to the readme
2012-03-20 15:44:11 +01:00
Matej Bukovinski f0bad8df77 Moved demo resources to appropriate subfolders. closes #58 2012-03-20 15:07:37 +01:00
Matej Bukovinski 99591c0b6a Resetting showStarted when HUD gets hidden due to #20. 2012-03-20 10:45:37 +01:00
Martin Dahl 3795e20e80 Don't hide using animation if the HUD was never shown due to a grace time 2012-03-20 10:41:32 +01:00
Matej Bukovinski ee3799cbf4 Added allHUDsForView:, and refactored existing methods to use it.
- some additional cleanup and refactoring of class methods
2012-03-20 10:20:35 +01:00
Alberto De Bortoli ecc2d11f6b Add method to hide and remove all the HUD subviews from a view
* The already present hideHUDForView:animated: method hide and
remove only one HUD found in the subviews (the last one).
There are cases when more than one HUD can be added to a view
(explicit add or just accidental fast user interactions):
the added hideAddHUDForView:animated: method hides and removes
all the HUD that have been previously added to a view.
2012-03-20 09:59:40 +01:00
Ben Loveridge 967ff36dc1 Fix some typos
Conflicts:

	MBProgressHUD.h
2012-03-20 09:44:07 +01:00
Ben Loveridge 6bb78c6124 Add +findHUDForView:
This is useful if you want to immediately remove a HUD from some view, but
don't already have the HUDView retained somewhere. Find it using this method,
set the minShowTime to 0, then use hideHUDForView:animated: as usual.
2012-03-20 09:37:09 +01:00
Matej Bukovinski b8a2c72104 Added the 2x checkmark image. #50 2012-03-20 09:14:25 +01:00
Matej Bukovinski 61613a3840 Merge pull request #50 from jazzgumpy/master
Retina resolution Checkmark graphics
2012-03-20 01:09:50 -07:00
Matej Bukovinski 1735f1d466 Merge pull request #55 from 5D/master
Add annular determinate, imitate Facebook image loading indicator
2012-03-20 01:00:29 -07:00
Wu Di ec1ac76db8 Add annular determinate mode, basically imitate Facebook.app image loading indicator 2012-03-20 13:15:09 +09:00
Matej Bukovinski 9eeb180c54 Merge pull request #52 from pereckerdal/master
Crash when initing MBProgressHUD object with initWithView and then not adding it to a superview
2012-03-19 05:53:21 -07:00
Per Eckerdal f2b9c1c5c5 Merge branch 'master' of github.com:pereckerdal/MBProgressHUD 2012-03-14 10:09:19 +01:00
Per Eckerdal 4e87347256 Fixed crash bug that happened when using initWithView and then not adding the view to a superview 2012-03-14 10:06:30 +01:00
Per Eckerdal 2b463234fb Merge branch 'master' into HEAD 2012-03-14 09:32:32 +01:00
Holger Frohloff c2073c4e49 New Retina resolution checkmark graphics 2012-03-08 17:18:25 +01:00
Per Eckerdal a49c7bb16b Added support for iOS 4 ARC 2012-03-03 12:33:08 +01:00
Matej Bukovinski 5748959026 Merge pull request #46 from matej/master
Removed duplicated method declarations
2012-02-16 00:14:14 -08:00
Matej Bukovinski 92b672781b Removed duplicate method declarations. 2012-02-16 09:09:40 +01:00
Matej Bukovinski fce87415d2 Merge pull request #45 from matej/master
Added iOS 4 arc support.
2012-02-15 09:38:33 -08:00
Matej Bukovinski 4124b39eb6 iOS 4 ARC compatibility added.
As suggested by jerbeers, see https://github.com/jdg/MBProgressHUD/pull/37#commitcomment-862709.
2012-02-15 18:34:12 +01:00
Matej Bukovinski 2afc4dd6e2 Merge pull request #41 from matej/master
Various fixes
2012-01-18 10:49:02 -08:00
Matej Bukovinski 49a531e7f7 Ignoring performSelector:withObject: warning. 2012-01-17 17:20:59 +01:00
Matej Bukovinski b65a713d61 Merge remote-tracking branch 'jdg/master' 2012-01-17 16:22:47 +01:00
Matej Bukovinski 08c16cdd5d Fixed the animated parameter in hide:afterDelay: method. 2012-01-17 16:16:16 +01:00
Matej Bukovinski 2235e68fc0 Project upgrade. 2012-01-17 16:10:28 +01:00
Matej Bukovinski caa804b7f5 Fixed a typo. 2012-01-17 16:09:09 +01:00
Jonathan George 1f34a8b83d Merge pull request #36 from renebigot/master
Bug correction in notification observer + ARC
2012-01-04 09:38:42 -08:00
renebigot bef5e79195 Version history modification 2012-01-03 22:56:35 +01:00
renebigot 537d279044 ARC compatibility + EXC_BAD_ACCESS correction
- Added support for ARC
- Still compatible with non ARC projects
- Notification observer for interface orientation moved to the
removeFromSuperview method. (it could cause an EXC_BAD_ACCESS otherwise)
- Remove one deviceOrientationDidChange: prototype definition
2012-01-03 22:54:16 +01:00
Matej Bukovinski f4e551a9c2 Merge pull request #29 from matej/master
Fixed two typos.
2011-11-14 01:11:19 -08:00
Matej Bukovinski 5d72491221 Fixed another typo. 2011-11-14 10:09:23 +01:00
Matej Bukovinski f5d0deb7f0 Fixed a typo. 2011-11-04 19:33:12 +01:00
Matej Bukovinski e324cbaeb2 Merge pull request #27 from matej/master
Various fixes
2011-11-03 08:17:28 -07:00
Matej Bukovinski 645a9dedbc Fixed background dimming rotation issues.
Closes #19
2011-11-03 16:06:41 +01:00
Matej Bukovinski 1fd1cd9692 Added the ability to force equal hud dimensions. 2011-11-03 15:53:42 +01:00
Matej Bukovinski fa1f7b7405 Minor margin adjustments. 2011-11-03 15:43:16 +01:00
Matej Bukovinski 66b75a2ebf Preventing details label screen overflow. 2011-11-03 15:24:28 +01:00
Matej Bukovinski c357ebbfdd Merge pull request #22 from tadelv/master
Add multiple lines support to detailsLabel
2011-11-03 07:05:14 -07:00
Vid Tadel 88d5881046 add multiple lines to detailsLabel 2011-10-03 21:42:43 -07:00
Matej Bukovinski 94d67d3464 Minimum bezel size property added. 2011-08-23 10:16:19 +02:00
Matej Bukovinski 3e3e361d55 Fixed static analyzer issues (leaks).
Closes #15.
2011-06-27 15:09:51 +02:00
Matej Bukovinski 0a516ff898 Some minor refactoring and cleanup. 2011-06-23 19:59:34 +02:00
Matej Bukovinski 304fde317c Merge pull request #17 from sbandol/master
Radial Gradient Option
2011-06-23 10:10:40 -07:00
StaS 54b1714471 Radial Gradient
Added option for a HUD with a radial gradient background.
2011-06-23 14:18:41 +02:00
Matej Bukovinski ca75dc3dfd Minor README and copyright updates. 2011-06-17 19:37:15 +02:00
Matej Bukovinski 9a0af8570b Merge 2011-06-17 19:27:25 +02:00
Jonathan George 019f4af26e Merge pull request #15 from meslater/master
iOS 5 support since UIProgressView no longer calls drawRect.
2011-06-15 12:36:48 -07:00
Michael Slater 97a4139b78 Removed dependency on UIProgressView in the round progress view to support iOS5 and replaced UIDeviceOrientation that was being cast from a UIInterfaceOrientation 2011-06-15 20:19:13 +01:00
Matej Bukovinski f1b998db91 Merge pull request #13 from insanehunter/master
Fixed compilation warnings
2011-06-03 01:38:36 -07:00
Sergei Cherepanov 110ec60b2e Fixed compilation warnings (double-float (64-32 bit) conversion and undeclared selectors) 2011-06-03 12:10:49 +04:00
Matej Bukovinski dc919da320 Fix for landscape problems when added to a window.
Closes #9.
2011-04-29 17:45:54 +02:00
Matej Bukovinski bba629af75 Added a NSURLConnection example. 2011-04-29 17:18:44 +02:00
Matej Bukovinski 62771b41d1 Added a new method (hid:afterDelay:). 2011-04-29 16:41:26 +02:00
Matej Bukovinski f6b9d49648 Demo project enhancements. 2011-04-29 16:24:09 +02:00
Matej Bukovinski c1cd3c88ed Removed an obsolete note. 2011-04-29 15:49:18 +02:00
Matej Bukovinski ad4c7aec08 Protocol and documentation cleanup. 2011-04-29 15:48:29 +02:00
Matej Bukovinski 1ea2644a29 Reimplemented MBRoundProgressView.
- no longer a UIProgressView subclass
2011-04-29 15:38:50 +02:00
Matej Bukovinski 0a305ebaea drawRect: cleanup 2011-04-29 15:25:02 +02:00
Matej Bukovinski 363bfd5aeb Sharper HUD border. 2011-04-29 15:21:27 +02:00
Matej Bukovinski bf5efa26e3 Fixed an incorrect variable type. 2011-02-03 09:46:58 +01:00
Jonathan George bba11aec5a Merge branch 'master' of https://github.com/myell0w/MBProgressHUD into myell0w-master 2010-12-03 02:16:42 -06:00
Daniel Yoo 7202c64683 Fix compiler warnings about undeclared selectors. 2010-12-02 09:21:55 -08:00
Matthias Tretter 66ff32a9ab Added HUD as parameter to delegate-call 2010-11-14 17:05:18 +01:00
Matej Bukovinski 6597ffb9e2 Updated the base SDK. 2010-11-08 09:29:35 +01:00
Matej Bukovinski f40a7a54a4 Checking if we still have a superView. Closes #7. 2010-11-08 09:28:47 +01:00
Matej Bukovinski 8faeea2300 Margin is now an exposed property. 2010-11-05 18:14:36 +01:00
Matej Bukovinski 4aba246bfa Changed the init syntax. Closes #8. 2010-11-04 00:17:05 +01:00
Frederic Jean b1aeb8602c Fixed a compiler warning. 2010-10-19 10:33:49 -06:00
Jonathan George a40421c705 Fix merge conflict. 2010-09-29 14:55:05 -05:00
Matej Bukovinski 766b92a9b4 Fixed version info in the header. 2010-08-02 11:55:54 +02:00
Matej Bukovinski fc8935176a Changed the default animation type to fade. 2010-07-26 09:19:14 +02:00
Matej Bukovinski 5eae2eabcd A (temporary) fix to correctly resize the HUD when rotating.
The demo app is now addidng the HUD to the navigation controller's view.
2010-07-26 08:43:51 +02:00
Matej Bukovinski 20478e1569 Updated the README. 2010-07-25 18:33:10 +02:00
Matej Bukovinski 77101cc90e Rotation support when ading the HUD to a window.
Demo app updated to show window rotation support. 
Thanks wuf810 for the initial suggestion: http://github.com/matej/MBProgressHUD/issues/closed#issue/1
2010-07-25 17:49:39 +02:00
Matej Bukovinski eedc69dc53 Class methods for quickly showing and hiding the HUD.
Not using perform selectior when calling seterts from the main thread. 
Added an option to automatically remove the HUD from its parent view when hidden. 

Demo app updates:
- GCD (blocks) example added 
- now using a scrollview
- added a navigation controller
- some project reorganization
- Default.png
- app icon
- changed the bundle identifier
2010-07-25 17:03:16 +02:00
Matej Bukovinski 8c07d2b061 Fixed a bug introduced 2 commits back.
The bug occurs when animated is set to NO and the animation mode is set to zoom (the default).
2010-07-25 10:43:52 +02:00
Matej Bukovinski ec1079f9c0 Minor header cleanup. 2010-07-24 17:47:51 +02:00
Matej Bukovinski 29480c6b0c Support for different animation modes.
Changed some default values (opacity, font sizes).
2010-07-24 17:22:33 +02:00
Matej Bukovinski d75d9b83b1 Added missing import.
Updated gitignore for Xcode 4. 
Xcode 4 workspace data.
2010-07-24 14:31:15 +02:00
Matej Bukovinski 4e2be496b9 Fixed some LLVM warnings.
warning: writable atomic property '*' cannot pair a synthesized setter/getter with a user defined setter/getter
2010-07-05 20:38:43 +02:00
Fraser Speirs 1d4cd3dc3d Added license information to README from MBProgressHUD.h. 2010-05-12 23:49:57 +08:00
40 changed files with 2926 additions and 2921 deletions
-1
View File
@@ -1 +0,0 @@
*.pbxproj -crlf -diff -merge
+5
View File
@@ -4,6 +4,8 @@ build/
*.mode1v3
*.mode2v3
*.perspectivev3
xcuserdata/
*.xccheckout
# old skool
.svn
@@ -15,3 +17,6 @@ profile
# vim noise
*~
*.swp
# AppCode noise
.idea/
+4
View File
@@ -0,0 +1,4 @@
language: objective-c
xcode_workspace: MBProgressHUD.xcworkspace
xcode_scheme: HudDemo
xcode_sdk: iphonesimulator
+4 -3
View File
@@ -10,13 +10,14 @@
@class HudDemoViewController;
@interface HudDemoAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
HudDemoViewController *viewController;
UIWindow *window;
UINavigationController *navController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet HudDemoViewController *viewController;
@property (nonatomic, retain) IBOutlet UINavigationController *navController;
@end
+7 -11
View File
@@ -9,25 +9,21 @@
#import "HudDemoAppDelegate.h"
#import "HudDemoViewController.h"
@implementation HudDemoAppDelegate
@synthesize window;
@synthesize viewController;
@synthesize navController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:viewController.view];
[window makeKeyAndVisible];
window.rootViewController = navController;
[window makeKeyAndVisible];
}
- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
[navController release];
[window release];
[super dealloc];
}
@end
+1 -15
View File
@@ -7,22 +7,8 @@
//
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
@interface HudDemoViewController : UIViewController <MBProgressHUDDelegate> {
MBProgressHUD *HUD;
}
- (IBAction)showSimple:(id)sender;
- (IBAction)showWithLabel:(id)sender;
- (IBAction)showWithDetailsLabel:(id)sender;
- (IBAction)showWithLabelDeterminate:(id)sender;
- (IBAction)showWithCustomView:(id)sender;
- (IBAction)showWithLabelMixed:(id)sender;
- (void)myTask;
- (void)myProgressTask;
- (void)myMixedTask;
@interface HudDemoViewController : UIViewController
@end
+255 -122
View File
@@ -7,195 +7,328 @@
//
#import "HudDemoViewController.h"
#import "MBProgressHUD.h"
#import <unistd.h>
#define SCREENSHOT_MODE 0
#ifndef kCFCoreFoundationVersionNumber_iOS_8_0
#define kCFCoreFoundationVersionNumber_iOS_7_0 847.20
#endif
@interface HudDemoViewController () <MBProgressHUDDelegate> {
MBProgressHUD *HUD;
long long expectedLength;
long long currentLength;
}
@property (retain, nonatomic) IBOutletCollection(UIButton) NSArray *buttons;
@end
@implementation HudDemoViewController
#pragma mark -
#pragma mark Lifecycle methods
#pragma mark - Lifecycle methods
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
// Release anything that's not essential, such as cached data
- (void)viewDidLoad {
UIView *content = [[self.view subviews] objectAtIndex:0];
#if SCREENSHOT_MODE
[content.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
#endif
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) {
[self.buttons setValue:@5.f forKeyPath:@"layer.cornerRadius"];
} else {
[self.buttons setValue:nil forKey:@"backgroundColor"];
}
((UIScrollView *)self.view).contentSize = content.bounds.size;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// No autoroation support when adding the HUD to a window!
// In that case you need to explicitly transform the HUD if you need a rotated version (i.g.,
// self.transform = CGAffineTransformMakeRotation(PI / 2); )
return YES;
return YES;
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
UIView *content = [[self.view subviews] objectAtIndex:0];
((UIScrollView *)self.view).contentSize = content.bounds.size;
}
- (void)dealloc {
[super dealloc];
[_buttons release];
[super dealloc];
}
#pragma mark -
#pragma mark IBActions
#pragma mark - Actions
- (IBAction)showSimple:(id)sender {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// The hud will dispable all input on the view (use the higest view possible in the view hierarchy)
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
//HUD.graceTime = 0.5;
//HUD.minShowTime = 5.0;
// Regiser for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
// Add HUD to screen
[self.view addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showWithLabel:(id)sender {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// Add HUD to screen
[self.view addSubview:HUD];
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.delegate = self;
HUD.labelText = @"Loading";
HUD.labelText = @"Loading";
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showWithDetailsLabel:(id)sender {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// Add HUD to screen
[self.view addSubview:HUD];
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.delegate = self;
HUD.labelText = @"Loading";
HUD.detailsLabelText = @"updating data";
HUD.square = YES;
HUD.labelText = @"Loading";
HUD.detailsLabelText = @"updating data";
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showWithLabelDeterminate:(id)sender {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// Set determinate mode
HUD.mode = MBProgressHUDModeDeterminate;
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Add HUD to screen
[self.view addSubview:HUD];
// Set determinate mode
HUD.mode = MBProgressHUDModeDeterminate;
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.delegate = self;
HUD.labelText = @"Loading";
HUD.labelText = @"Loading";
// myProgressTask uses the HUD instance to update progress
[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showWIthLabelAnnularDeterminate:(id)sender {
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];
// Set determinate mode
HUD.mode = MBProgressHUDModeAnnularDeterminate;
HUD.delegate = self;
HUD.labelText = @"Loading";
// myProgressTask uses the HUD instance to update progress
[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 {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// Set custom view mode
HUD.mode = MBProgressHUDModeCustomView;
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Add HUD to screen
[self.view addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.labelText = @"Completed";
// The sample image is based on the work by www.pixelpressicons.com, http://creativecommons.org/licenses/by/2.5/ca/
// The sample image is based on the work by http://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];
// This would only show the completed text with no visible custom view
// HUD.customView = [[UIView alloc] initWithFrame:CGRectZero];
// Set custom view mode
HUD.mode = MBProgressHUDModeCustomView;
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myProgressTask) onTarget:self withObject:nil animated:YES];
HUD.delegate = self;
HUD.labelText = @"Completed";
[HUD show:YES];
[HUD hide:YES afterDelay:3];
}
- (IBAction)showWithLabelMixed:(id)sender {
// The hud will dispable all input on the view
HUD = [[MBProgressHUD alloc] initWithView:self.view];
// Add HUD to screen
[self.view addSubview:HUD];
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.delegate = self;
HUD.labelText = @"Connecting";
HUD.minSize = CGSizeMake(135.f, 135.f);
HUD.labelText = @"Connecting";
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myMixedTask) onTarget:self withObject:nil animated:YES];
[HUD showWhileExecuting:@selector(myMixedTask) onTarget:self withObject:nil animated:YES];
}
#pragma mark -
#pragma mark Execution code
- (IBAction)showUsingBlocks:(id)sender {
#if NS_BLOCKS_AVAILABLE
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:hud];
hud.labelText = @"With a block";
[hud showAnimated:YES whileExecutingBlock:^{
[self myTask];
} completionBlock:^{
[hud removeFromSuperview];
[hud release];
}];
#endif
}
- (IBAction)showOnWindow:(id)sender {
// The hud will dispable all input on the window
HUD = [[MBProgressHUD alloc] initWithView:self.view.window];
[self.view.window addSubview:HUD];
HUD.delegate = self;
HUD.labelText = @"Loading";
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showURL:(id)sender {
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];
[connection start];
[connection release];
HUD = [[MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES] retain];
HUD.delegate = self;
}
- (IBAction)showWithGradient:(id)sender {
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:HUD];
HUD.dimBackground = YES;
// Regiser for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
}
- (IBAction)showTextOnly:(id)sender {
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
// Configure for text only and offset down
hud.mode = MBProgressHUDModeText;
hud.labelText = @"Some message...";
hud.margin = 10.f;
hud.removeFromSuperViewOnHide = YES;
[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 - Execution code
- (void)myTask {
// Do something usefull in here instead of sleeping ...
sleep(3);
// Labels can be changed during the execution
//HUD.detailsLabelText = @"Something";
//sleep(3);
// Do something usefull in here instead of sleeping ...
sleep(3);
}
- (void)myProgressTask {
// This just increases the progress indicator in a loop
float progress = 0.0f;
while (progress < 1.0f) {
progress += 0.01f;
HUD.progress = progress;
usleep(50000);
}
// This just increases the progress indicator in a loop
float progress = 0.0f;
while (progress < 1.0f) {
progress += 0.01f;
HUD.progress = progress;
usleep(50000);
}
}
- (void)myMixedTask {
// Indeterminate mode
sleep(2);
// Switch to determinate mode
HUD.mode = MBProgressHUDModeDeterminate;
HUD.labelText = @"Downloading";
float progress = 0.0f;
while (progress < 1.0f)
{
progress += 0.01f;
HUD.progress = progress;
usleep(50000);
}
// Back to indeterminate mode
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];
// Indeterminate mode
sleep(2);
// Switch to determinate mode
HUD.mode = MBProgressHUDModeDeterminate;
HUD.labelText = @"Progress";
float progress = 0.0f;
while (progress < 1.0f)
{
progress += 0.01f;
HUD.progress = progress;
usleep(50000);
}
// Back to indeterminate mode
HUD.mode = MBProgressHUDModeIndeterminate;
HUD.labelText = @"Cleaning up";
sleep(2);
// 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);
}
#pragma mark -
#pragma mark MBProgressHUDDelegate methods
#pragma mark - NSURLConnectionDelegete
- (void)hudWasHidden {
// Remove HUD from screen when the HUD was hidded
[HUD removeFromSuperview];
[HUD release];
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
expectedLength = MAX([response expectedContentLength], 1);
currentLength = 0;
HUD.mode = MBProgressHUDModeDeterminate;
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
currentLength += [data length];
HUD.progress = currentLength / (float)expectedLength;
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
HUD.customView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"37x-Checkmark.png"]] autorelease];
HUD.mode = MBProgressHUDModeCustomView;
[HUD hide:YES afterDelay:2];
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
[HUD hide:YES];
}
#pragma mark - MBProgressHUDDelegate
- (void)hudWasHidden:(MBProgressHUD *)hud {
// Remove HUD from screen when the HUD was hidded
[HUD removeFromSuperview];
[HUD release];
HUD = nil;
}
- (void)viewDidUnload {
[self setButtons:nil];
[super viewDidUnload];
}
@end
-1557
View File
File diff suppressed because it is too large Load Diff
+321 -29
View File
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@@ -11,30 +11,67 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
2899E5220DE3E06400AC0155 /* HudDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* HudDemoViewController.xib */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
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 */; };
D286A6801518736B00E13FB8 /* 37x-Checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D286A67F1518736B00E13FB8 /* 37x-Checkmark@2x.png */; };
D286A7321518C53500E13FB8 /* HudDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D286A7341518C53500E13FB8 /* HudDemoViewController.xib */; };
D286A7361518C53C00E13FB8 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = D286A7381518C53C00E13FB8 /* MainWindow.xib */; };
D286A76D1518CA9F00E13FB8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */; };
D28CBB321A87A45A0052DCEC /* HudTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D28CBB311A87A45A0052DCEC /* HudTests.m */; };
D28CBB381A87A4A10052DCEC /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* MBProgressHUD.m */; };
D2A6FD1D13ABC5A200BFE4C9 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D2A6FD1C13ABC5A200BFE4C9 /* Default@2x.png */; };
D2F88CD6115E9F7F00E6DB82 /* 37x-Checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = D2F88CD5115E9F7F00E6DB82 /* 37x-Checkmark.png */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
D28CBB331A87A45A0052DCEC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 1D6058900D05DD3D006BFB54;
remoteInfo = HudDemo;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* HudDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HudDemoAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* HudDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HudDemoAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* HudDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HudDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
2899E5210DE3E06400AC0155 /* HudDemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HudDemoViewController.xib; sourceTree = "<group>"; };
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
28D7ACF60DDB3853001CB0EB /* HudDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HudDemoViewController.h; sourceTree = "<group>"; };
28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HudDemoViewController.m; sourceTree = "<group>"; };
28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HudDemoViewController.m; sourceTree = "<group>"; usesTabs = 1; };
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>"; };
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>"; };
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>"; };
D277FDB711FC877E00304321 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = Images/Icon.png; sourceTree = "<group>"; };
D277FDB811FC877E00304321 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "Images/Icon@2x.png"; sourceTree = "<group>"; };
D286A67F1518736B00E13FB8 /* 37x-Checkmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "37x-Checkmark@2x.png"; path = "Images/37x-Checkmark@2x.png"; sourceTree = "<group>"; };
D286A7331518C53500E13FB8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/HudDemoViewController.xib; sourceTree = "<group>"; };
D286A7371518C53C00E13FB8 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
D28CBB2D1A87A45A0052DCEC /* HudTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HudTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D28CBB301A87A45A0052DCEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D28CBB311A87A45A0052DCEC /* HudTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HudTests.m; sourceTree = "<group>"; };
D2A6FD1C13ABC5A200BFE4C9 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Images/Default@2x.png"; sourceTree = "<group>"; };
D2F88CD5115E9F7F00E6DB82 /* 37x-Checkmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "37x-Checkmark.png"; path = "Images/37x-Checkmark.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -43,25 +80,33 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D286A76D1518CA9F00E13FB8 /* CoreGraphics.framework in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D28CBB2A1A87A45A0052DCEC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
080E96DDFE201D6D7F000001 /* HudDemo */ = {
isa = PBXGroup;
children = (
D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */,
D22F7D800F85241C00550BB3 /* MBProgressHUD.m */,
1D3623240D0F684500981E51 /* HudDemoAppDelegate.h */,
1D3623250D0F684500981E51 /* HudDemoAppDelegate.m */,
28D7ACF60DDB3853001CB0EB /* HudDemoViewController.h */,
28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
);
name = HudDemo;
path = Classes;
sourceTree = "<group>";
};
@@ -69,6 +114,7 @@
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* HudDemo.app */,
D28CBB2D1A87A45A0052DCEC /* HudTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -76,9 +122,9 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
080E96DDFE201D6D7F000001 /* HudDemo */,
D28CBB2E1A87A45A0052DCEC /* HudTests */,
D28CBB391A87A6B00052DCEC /* MBProgressHUD */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
@@ -92,29 +138,84 @@
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
path = ..;
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
D2F88CD5115E9F7F00E6DB82 /* 37x-Checkmark.png */,
2899E5210DE3E06400AC0155 /* HudDemoViewController.xib */,
28AD733E0D9D9553002E5188 /* MainWindow.xib */,
D277FDBF11FC880100304321 /* UI */,
D277FDBD11FC879500304321 /* Images */,
8D1107310486CEB800E47090 /* Info.plist */,
);
name = Resources;
path = ..;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */,
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
288765A40DF7441C002DB57D /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
D277FDBD11FC879500304321 /* Images */ = {
isa = PBXGroup;
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 */,
);
name = Images;
sourceTree = "<group>";
};
D277FDBF11FC880100304321 /* UI */ = {
isa = PBXGroup;
children = (
D286A7341518C53500E13FB8 /* HudDemoViewController.xib */,
D286A7381518C53C00E13FB8 /* MainWindow.xib */,
);
name = UI;
sourceTree = "<group>";
};
D28CBB2E1A87A45A0052DCEC /* HudTests */ = {
isa = PBXGroup;
children = (
D28CBB311A87A45A0052DCEC /* HudTests.m */,
D28CBB2F1A87A45A0052DCEC /* Supporting Files */,
);
path = HudTests;
sourceTree = "<group>";
};
D28CBB2F1A87A45A0052DCEC /* Supporting Files */ = {
isa = PBXGroup;
children = (
D28CBB301A87A45A0052DCEC /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
D28CBB391A87A6B00052DCEC /* MBProgressHUD */ = {
isa = PBXGroup;
children = (
D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */,
D22F7D800F85241C00550BB3 /* MBProgressHUD.m */,
);
name = MBProgressHUD;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -135,19 +236,56 @@
productReference = 1D6058910D05DD3D006BFB54 /* HudDemo.app */;
productType = "com.apple.product-type.application";
};
D28CBB2C1A87A45A0052DCEC /* HudTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D28CBB351A87A45A0052DCEC /* Build configuration list for PBXNativeTarget "HudTests" */;
buildPhases = (
D28CBB291A87A45A0052DCEC /* Sources */,
D28CBB2A1A87A45A0052DCEC /* Frameworks */,
D28CBB2B1A87A45A0052DCEC /* Resources */,
);
buildRules = (
);
dependencies = (
D28CBB341A87A45A0052DCEC /* PBXTargetDependency */,
);
name = HudTests;
productName = HudTests;
productReference = D28CBB2D1A87A45A0052DCEC /* HudTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = MB;
LastUpgradeCheck = 0600;
ORGANIZATIONNAME = "Matej Bukovinski";
TargetAttributes = {
D28CBB2C1A87A45A0052DCEC = {
CreatedOnToolsVersion = 6.1.1;
TestTargetID = 1D6058900D05DD3D006BFB54;
};
};
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */;
compatibilityVersion = "Xcode 3.1";
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* HudDemo */,
D28CBB2C1A87A45A0052DCEC /* HudTests */,
);
};
/* End PBXProject section */
@@ -157,9 +295,27 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
2899E5220DE3E06400AC0155 /* HudDemoViewController.xib in Resources */,
D286A7361518C53C00E13FB8 /* MainWindow.xib in Resources */,
D286A7321518C53500E13FB8 /* HudDemoViewController.xib in Resources */,
D2F88CD6115E9F7F00E6DB82 /* 37x-Checkmark.png in Resources */,
D277FDB311FC834200304321 /* Default.png in Resources */,
D277FDB911FC877E00304321 /* Icon.png in Resources */,
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;
};
D28CBB2B1A87A45A0052DCEC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -177,8 +333,44 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D28CBB291A87A45A0052DCEC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D28CBB321A87A45A0052DCEC /* HudTests.m in Sources */,
D28CBB381A87A4A10052DCEC /* MBProgressHUD.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
D28CBB341A87A45A0052DCEC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 1D6058900D05DD3D006BFB54 /* HudDemo */;
targetProxy = D28CBB331A87A45A0052DCEC /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
D286A7341518C53500E13FB8 /* HudDemoViewController.xib */ = {
isa = PBXVariantGroup;
children = (
D286A7331518C53500E13FB8 /* en */,
);
name = HudDemoViewController.xib;
sourceTree = "<group>";
};
D286A7381518C53C00E13FB8 /* MainWindow.xib */ = {
isa = PBXVariantGroup;
children = (
D286A7371518C53C00E13FB8 /* en */,
);
name = MainWindow.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -191,6 +383,7 @@
GCC_PREFIX_HEADER = HudDemo_Prefix.pch;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = HudDemo;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
@@ -203,33 +396,124 @@
GCC_PREFIX_HEADER = HudDemo_Prefix.pch;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = HudDemo;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
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.3;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = iphoneos2.2;
SDKROOT = iphoneos;
};
name = Debug;
};
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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
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;
PREBINDING = NO;
SDKROOT = iphoneos2.2;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
SDKROOT = iphoneos;
};
name = Release;
};
D28CBB361A87A45A0052DCEC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = HudTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo";
};
name = Debug;
};
D28CBB371A87A45A0052DCEC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = HudTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
@@ -254,6 +538,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D28CBB351A87A45A0052DCEC /* Build configuration list for PBXNativeTarget "HudTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D28CBB361A87A45A0052DCEC /* Debug */,
D28CBB371A87A45A0052DCEC /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace>
<FileRef
location = "self:HudDemo.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
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>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D28CBB2C1A87A45A0052DCEC"
BuildableName = "HudTests.xctest"
BlueprintName = "HudTests"
ReferencedContainer = "container:HudDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D28CBB2C1A87A45A0052DCEC"
BuildableName = "HudTests.xctest"
BlueprintName = "HudTests"
ReferencedContainer = "container:HudDemo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "HudDemo.app"
BlueprintName = "HudDemo"
ReferencedContainer = "container:HudDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
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>
-414
View File
@@ -1,414 +0,0 @@
<?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">10C540</string>
<string key="IBDocument.InterfaceBuilderVersion">740</string>
<string key="IBDocument.AppKitVersion">1038.25</string>
<string key="IBDocument.HIToolboxVersion">458.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">62</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="6"/>
</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>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
</object>
<object class="IBProxyObject" id="843779117">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
<object class="IBUIView" id="774585933">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIButton" id="960472997">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 20}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<object class="NSFont" key="IBUIFont" id="432819284">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Simple indeterminate progress</string>
<object class="NSColor" key="IBUIHighlightedTitleColor" id="434568641">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor" id="612289531">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
<object class="IBUIButton" id="626654324">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 68}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<reference key="IBUIFont" ref="432819284"/>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">With label</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"/>
</object>
<object class="IBUIButton" id="244375631">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 116}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<reference key="IBUIFont" ref="432819284"/>
<int key="IBUIButtonType">1</int>
<string key="IBUIHighlightedTitle">With details label</string>
<string key="IBUIDisabledTitle">With details label</string>
<string key="IBUISelectedTitle">With details label</string>
<string key="IBUINormalTitle">With details label</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"/>
</object>
<object class="IBUIButton" id="322519489">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 164}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<reference key="IBUIFont" ref="432819284"/>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">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"/>
</object>
<object class="IBUIButton" id="319652209">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 260}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<reference key="IBUIFont" ref="432819284"/>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Mode switching</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"/>
</object>
<object class="IBUIButton" id="424785">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">294</int>
<string key="NSFrame">{{20, 212}, {280, 40}}</string>
<reference key="NSSuperview" ref="774585933"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">3</int>
<reference key="IBUIFont" ref="432819284"/>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Custom view</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"/>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC44ODYyNzQ1MDk4IDAuOTA1ODgyMzUyOSAwLjkyOTQxMTc2NDcAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</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">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="774585933"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showSimple:</string>
<reference key="source" ref="960472997"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showWithLabel:</string>
<reference key="source" ref="626654324"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showWithDetailsLabel:</string>
<reference key="source" ref="244375631"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showWithLabelDeterminate:</string>
<reference key="source" ref="322519489"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showWithLabelMixed:</string>
<reference key="source" ref="319652209"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">21</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showWithCustomView:</string>
<reference key="source" ref="424785"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">47</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>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="843779117"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="774585933"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="960472997"/>
<reference ref="626654324"/>
<reference ref="244375631"/>
<reference ref="322519489"/>
<reference ref="424785"/>
<reference ref="319652209"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">20</int>
<reference key="object" ref="319652209"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">16</int>
<reference key="object" ref="322519489"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="244375631"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="626654324"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="960472997"/>
<reference key="parent" ref="774585933"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="424785"/>
<reference key="parent" ref="774585933"/>
</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>-2.CustomClassName</string>
<string>10.IBPluginDependency</string>
<string>16.IBPluginDependency</string>
<string>20.IBPluginDependency</string>
<string>43.IBPluginDependency</string>
<string>6.IBEditorWindowLastContentRect</string>
<string>6.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>HudDemoViewController</string>
<string>UIResponder</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>
<string>{{179, 181}, {320, 480}}</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">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</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>
</object>
<nil key="sourceID"/>
<int key="maxID">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<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>showSimple:</string>
<string>showWithCustomView:</string>
<string>showWithDetailsLabel:</string>
<string>showWithLabel:</string>
<string>showWithLabelDeterminate:</string>
<string>showWithLabelMixed:</string>
<string>showWithLabelOnly:</string>
</object>
<object class="NSMutableArray" 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>
</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>
<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>
<integer value="544" 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">3.1</string>
</data>
</archive>
+42
View File
@@ -0,0 +1,42 @@
//
// HudTests.m
// HudTests
//
// Created by Matej Bukovinski on 8. 02. 15.
// Copyright (c) 2015 Matej Bukovinski. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "MBProgressHUD.h"
@interface HudTests : XCTestCase
@property (nonatomic, strong) MBProgressHUD *hud;
@property (nonatomic, strong) UIView *view;
@end
@implementation HudTests
- (void)setUp {
[super setUp];
self.view = [[UIView alloc] init];
self.view.bounds = [[UIScreen mainScreen] bounds];
self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
}
- (void)tearDown {
self.hud = nil;
self.view = nil;
[super tearDown];
}
- (void)testThatHUDExists {
XCTAssertNotNil(self.hud, @"Should be able to create a new HUD instance");
}
@end
+24
View File
@@ -0,0 +1,24 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.bukovinski.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+40 -1
View File
@@ -10,14 +10,23 @@
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-Small</string>
<string>Icon-iOS7</string>
<string>Icon.png</string>
<string>Icon@2x.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
<string>com.bukovinski.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<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>
@@ -26,5 +35,35 @@
<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>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
-206
View File
@@ -1,206 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.02">
<data>
<int key="IBDocument.SystemTarget">528</int>
<string key="IBDocument.SystemVersion">9E17</string>
<string key="IBDocument.InterfaceBuilderVersion">672</string>
<string key="IBDocument.AppKitVersion">949.33</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="10"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
</object>
<object class="IBProxyObject" id="427554174">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
<object class="IBUICustomObject" id="664661524"/>
<object class="IBUIViewController" id="943309135">
<string key="IBUINibName">HudDemoViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="IBUIWindow" id="117978783">
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 480}</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</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">viewController</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="943309135"/>
</object>
<int key="connectionID">11</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>
<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="957960031">
<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="957960031"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="664661524"/>
<reference key="parent" ref="957960031"/>
<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="957960031"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="943309135"/>
<reference key="parent" ref="957960031"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="117978783"/>
<reference key="parent" ref="957960031"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>10.CustomClassName</string>
<string>10.IBEditorWindowLastContentRect</string>
<string>10.IBPluginDependency</string>
<string>12.IBEditorWindowLastContentRect</string>
<string>12.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
<string>HudDemoViewController</string>
<string>{{512, 351}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{525, 346}, {320, 480}}</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>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">14</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="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>viewController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>HudDemoViewController</string>
<string>UIWindow</string>
</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">HudDemoAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">HudDemoViewController</string>
<string key="superclassName">UIViewController</string>
<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.LastKnownRelativeProjectPath">HudDemo.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
+269
View File
@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment version="528" defaultVersion="1072" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HudDemoViewController">
<connections>
<outlet property="view" destination="52" id="70"/>
<outletCollection property="buttons" destination="8" id="1Qm-jt-yv2"/>
<outletCollection property="buttons" destination="9" id="EHW-ch-h6c"/>
<outletCollection property="buttons" destination="10" id="g6I-6a-hVf"/>
<outletCollection property="buttons" destination="16" id="y8l-Gw-EuC"/>
<outletCollection property="buttons" destination="106" id="mfq-yU-kF4"/>
<outletCollection property="buttons" destination="117" id="Sew-7b-Taq"/>
<outletCollection property="buttons" destination="20" id="ij2-Dq-pWR"/>
<outletCollection property="buttons" destination="49" id="Ap4-YL-HTN"/>
<outletCollection property="buttons" destination="71" id="5wc-Ky-Zdq"/>
<outletCollection property="buttons" destination="76" id="N9J-sh-Sai"/>
<outletCollection property="buttons" destination="43" id="wWh-rQ-Y81"/>
<outletCollection property="buttons" destination="79" id="mUt-YM-wkJ"/>
<outletCollection property="buttons" destination="111" id="2gl-eT-6Ke"/>
<outletCollection property="buttons" destination="115" id="L2G-gy-G5K"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="52">
<rect key="frame" x="0.0" y="0.0" width="320" height="697"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="54">
<rect key="frame" x="0.0" y="0.0" width="320" height="697"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="9">
<rect key="frame" x="20" y="68" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="With label">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithLabel:" destination="-1" eventType="touchUpInside" id="13"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="10">
<rect key="frame" x="20" y="116" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="With details label">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="disabled" title="With details label"/>
<state key="selected" title="With details label"/>
<state key="highlighted" title="With details label">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithDetailsLabel:" destination="-1" eventType="touchUpInside" id="14"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="16">
<rect key="frame" x="20" y="164" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Determinate mode">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithLabelDeterminate:" destination="-1" eventType="touchUpInside" id="17"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="106">
<rect key="frame" x="20" y="212" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Annular determinate mode">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWIthLabelAnnularDeterminate:" destination="-1" eventType="touchUpInside" id="120"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="117">
<rect key="frame" x="20" y="257" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Bar determinate mode">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithLabelDeterminateHorizontalBar:" destination="-1" eventType="touchUpInside" id="121"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="20">
<rect key="frame" x="20" y="354" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Mode switching">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithLabelMixed:" destination="-1" eventType="touchUpInside" id="21"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="49">
<rect key="frame" x="20" y="400" width="280" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Using blocks">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showUsingBlocks:" destination="-1" eventType="touchUpInside" id="51"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="71">
<rect key="frame" x="20" y="450" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="On Window">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showOnWindow:" destination="-1" eventType="touchUpInside" id="73"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="76">
<rect key="frame" x="20" y="498" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="NSURLConnection">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showURL:" destination="-1" eventType="touchUpInside" id="78"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="43">
<rect key="frame" x="20" y="306" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Custom view">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithCustomView:" destination="-1" eventType="touchUpInside" id="47"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="79">
<rect key="frame" x="20" y="545" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Dim background">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithGradient:" destination="-1" eventType="touchUpInside" id="81"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="111">
<rect key="frame" x="20" y="593" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Text only">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showTextOnly:" destination="-1" eventType="touchUpInside" id="113"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="115">
<rect key="frame" x="20" y="641" width="280" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Colored">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showWithColor:" destination="-1" eventType="touchUpInside" id="116"/>
</connections>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" buttonType="roundedRect" lineBreakMode="middleTruncation" id="8">
<rect key="frame" x="20" y="20" width="280" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.95294117647058818" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Simple indeterminate progress">
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" red="0.0" green="0.23884613512332439" blue="0.49733664772727271" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showSimple:" destination="-1" eventType="touchUpInside" id="12"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.8862745098" green="0.90588235289999997" blue="0.92941176469999998" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</scrollView>
</objects>
</document>
+77
View File
@@ -0,0 +1,77 @@
<?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>
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2009-2015 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.
+15
View File
@@ -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
+372 -130
View File
@@ -1,12 +1,12 @@
//
// MBProgressHUD.h
// Version 0.33
// Version 0.9.1
// Created by Matej Bukovinski on 2.4.09.
//
// This code is distributed under the terms and conditions of the MIT license.
// Copyright (c) 2009 Matej Bukovinski
// Copyright (c) 2009-2015 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
@@ -26,61 +26,81 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
/**
* MBProgressHUD operation modes.
*/
typedef enum {
/** Progress is shown using an UIActivityIndicatorView. This is the default. */
MBProgressHUDModeIndeterminate,
/** Progress is shown using a MBRoundProgressView. */
@protocol MBProgressHUDDelegate;
typedef NS_ENUM(NSInteger, MBProgressHUDMode) {
/** Progress is shown using an UIActivityIndicatorView. This is the default. */
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 */
MBProgressHUDModeCustomView
} MBProgressHUDMode;
MBProgressHUDModeCustomView,
/** Shows only labels */
MBProgressHUDModeText
};
typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) {
/** Opacity animation */
MBProgressHUDAnimationFade,
/** Opacity + scale animation */
MBProgressHUDAnimationZoom,
MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,
MBProgressHUDAnimationZoomIn
};
/**
* Defines callback methods for MBProgressHUD delegates.
*/
@protocol MBProgressHUDDelegate <NSObject>
#ifndef MB_INSTANCETYPE
#if __has_feature(objc_instancetype)
#define MB_INSTANCETYPE instancetype
#else
#define MB_INSTANCETYPE id
#endif
#endif
@required
/**
* A callback function that is called after the HUD was fully hidden from the screen.
*/
- (void)hudWasHidden;
#ifndef MB_STRONG
#if __has_feature(objc_arc)
#define MB_STRONG strong
#else
#define MB_STRONG retain
#endif
#endif
@end
#ifndef MB_WEAK
#if __has_feature(objc_arc_weak)
#define MB_WEAK weak
#elif __has_feature(objc_arc)
#define MB_WEAK unsafe_unretained
#else
#define MB_WEAK assign
#endif
#endif
#if NS_BLOCKS_AVAILABLE
typedef void (^MBProgressHUDCompletionBlock)();
#endif
/**
* A progress view for showing definite progress by filling up a circle (similar to the indicator for building in xcode).
*/
@interface MBRoundProgressView : UIProgressView {
}
/**
* Create a 37 by 37 pixel indicator.
* This is the same size as used by the larger UIActivityIndicatorView.
*/
- (id)initWithDefaultSize;
@end
/**
* 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 three modes of operation:
* This view supports four modes of operation:
* - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView
* - MBProgressHUDModeDeterminate - shows a custom round progress indicator (MBRoundProgressView)
* - MBProgressHUDModeDeterminate - shows a custom round progress indicator
* - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator
* - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView)
*
* All three modes can have optional labels assigned:
@@ -88,51 +108,68 @@ typedef enum {
* indicator view.
* - If also the detailsLabelText property is set then another label is placed below the first label.
*/
@interface MBProgressHUD : UIView {
MBProgressHUDMode mode;
SEL methodForExecution;
id targetForExecution;
id objectForExecution;
BOOL useAnimation;
float yOffset;
float xOffset;
float width;
float height;
BOOL taskInProgress;
float graceTime;
float minShowTime;
NSTimer *graceTimer;
NSTimer *minShowTimer;
NSDate *showStarted;
UIView *indicator;
UILabel *label;
UILabel *detailsLabel;
float progress;
id<MBProgressHUDDelegate> delegate;
NSString *labelText;
NSString *detailsLabelText;
float opacity;
UIFont *labelFont;
UIFont *detailsLabelFont;
BOOL isFinished;
UIView *customView;
}
@interface MBProgressHUD : UIView
/**
/**
* 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 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
*/
+ (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:.
*
* @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
* animations while disappearing.
* @return YES if a HUD was found and removed, NO otherwise.
*
* @see showHUDAddedTo:animated:
* @see animationType
*/
+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;
/**
* Finds all the HUD subviews and hides them.
*
* @param view The view that is going to be searched for HUD subviews.
* @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use
* animations while disappearing.
* @return the number of HUDs found and removed.
*
* @see hideHUDForView:animated:
* @see animationType
*/
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;
/**
* 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.
*/
+ (MB_INSTANCETYPE)HUDForView:(UIView *)view;
/**
* Finds all HUD subviews and returns them.
*
* @param view The view that is going to be searched.
* @return All found HUD views (array of MBProgressHUD objects).
*/
+ (NSArray *)allHUDsForView:(UIView *)view;
/**
* A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with
* window.bounds as the parameter.
*
* @param window The window instance that will provide the bounds for the HUD. Should probably be the same instance as
* @param window The window instance that will provide the bounds for the HUD. Should be the same instance as
* the HUD's superview (i.e., the window that the HUD will be added to).
*/
- (id)initWithWindow:(UIWindow *)window;
@@ -140,30 +177,131 @@ 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 probably be the same instance as
*
* @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;
/**
* The UIView (i.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).
/**
* 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
*/
@property (retain) UIView *customView;
- (void)show:(BOOL)animated;
/**
* MBProgressHUD operation mode. Switches between indeterminate (MBProgressHUDModeIndeterminate) and determinate
* progress (MBProgressHUDModeDeterminate). The default is MBProgressHUDModeIndeterminate.
* 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.
*
* @see MBProgressHUDMode
*/
@property (assign) MBProgressHUDMode mode;
/**
* The HUD delegate object. If set the delegate will receive hudWasHidden callbacks when the HUD was hidden. The
* delegate should conform to the MBProgressHUDDelegate protocol and implement the hudWasHidden method. The delegate
* object will not be retained.
/**
* The animation type that should be used when the HUD is shown and hidden.
*
* @see MBProgressHUDAnimation
*/
@property (assign) id<MBProgressHUDDelegate> delegate;
@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 built in indicator bounds).
*/
@property (MB_STRONG) UIView *customView;
/**
* The HUD delegate object.
*
* @see MBProgressHUDDelegate
*/
@property (MB_WEAK) id<MBProgressHUDDelegate> delegate;
/**
* An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit
@@ -174,28 +312,52 @@ typedef enum {
/**
* An optional details message displayed below the labelText message. This message is displayed only if the labelText
* property is also set and is different from an empty string (@"").
* property is also set and is different from an empty string (@""). The details text can span multiple lines.
*/
@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 amount of space between the HUD edge and the HUD elements (labels, indicators or custom views).
* Defaults to 20.0
*/
@property (assign) float margin;
/**
* The corner radius for the HUD
* Defaults to 10.0
*/
@property (assign) float cornerRadius;
/**
* Cover the HUD background view with a radial gradient.
*/
@property (assign) BOOL dimBackground;
/*
* 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).
@@ -204,7 +366,6 @@ typedef enum {
*/
@property (assign) float graceTime;
/**
* The minimum time (in seconds) that the HUD is shown.
* This avoids the problem of the HUD being shown and than instantly hidden.
@@ -218,56 +379,137 @@ 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 its parent view when hidden.
* Defaults to NO.
*/
@property (assign) BOOL removeFromSuperViewOnHide;
/**
* Font to be used for the main label. Set this property if the default is not adequate.
*/
@property (retain) UIFont* labelFont;
@property (MB_STRONG) UIFont* labelFont;
/**
* Color to be used for the main label. Set this property if the default is not adequate.
*/
@property (MB_STRONG) UIColor* labelColor;
/**
* Font to be used for the details label. Set this property if the default is not adequate.
*/
@property (MB_STRONG) UIFont* detailsLabelFont;
/**
* Font to be used for the details label. Set this property if the default is not adequate.
* Color to be used for the details label. Set this property if the default is not adequate.
*/
@property (retain) UIFont* detailsLabelFont;
@property (MB_STRONG) UIColor* detailsLabelColor;
/**
* The color of the activity indicator. Defaults to [UIColor whiteColor]
* Does nothing on pre iOS 5.
*/
@property (MB_STRONG) UIColor *activityIndicatorColor;
/**
* The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0.
*/
@property (assign) float progress;
/**
* 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 a fade animation. If set to NO the HUD will not use
* animations while appearing.
/**
* The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size).
*/
- (void)show:(BOOL)animated;
@property (assign) CGSize minSize;
/**
* 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 a fade animation. If set to NO the HUD will not use
* animations while disappearing.
*/
- (void)hide:(BOOL)animated;
/**
* 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 appear and disappear using a fade animation. If set to NO the HUD will
* not use animations while appearing and disappearing.
/**
* The actual size of the HUD bezel.
* You can use this to limit touch handling on the bezel aria only.
* @see https://github.com/jdg/MBProgressHUD/pull/200
*/
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
@property (atomic, assign, readonly) CGSize size;
/**
* Force the HUD dimensions to be equal if possible.
*/
@property (assign, getter = isSquare) BOOL square;
@end
@protocol MBProgressHUDDelegate <NSObject>
@optional
/**
* Called after the HUD was fully hidden from the screen.
*/
- (void)hudWasHidden:(MBProgressHUD *)hud;
@end
/**
* A progress view for showing definite progress by filling up a circle (pie chart).
*/
@interface MBRoundProgressView : UIView
/**
* Progress (0.0 to 1.0)
*/
@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
+885 -392
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
Pod::Spec.new do |s|
s.name = "MBProgressHUD"
s.version = "0.9.1"
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
+267
View File
@@ -0,0 +1,267 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
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 */; };
/* 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; };
D286A7521518C70F00E13FB8 /* MBProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = SOURCE_ROOT; };
D286A75D1518C89600E13FB8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D286A7461518C70F00E13FB8 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
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 = (
D286A74E1518C70F00E13FB8 /* MBProgressHUD */,
D286A74B1518C70F00E13FB8 /* Frameworks */,
D286A74A1518C70F00E13FB8 /* Products */,
);
sourceTree = "<group>";
};
D286A74A1518C70F00E13FB8 /* Products */ = {
isa = PBXGroup;
children = (
D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */,
);
name = Products;
sourceTree = "<group>";
};
D286A74B1518C70F00E13FB8 /* Frameworks */ = {
isa = PBXGroup;
children = (
D286A75D1518C89600E13FB8 /* UIKit.framework */,
D286A74C1518C70F00E13FB8 /* Foundation.framework */,
D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
D286A74E1518C70F00E13FB8 /* MBProgressHUD */ = {
isa = PBXGroup;
children = (
D286A7511518C70F00E13FB8 /* MBProgressHUD.h */,
D286A7521518C70F00E13FB8 /* MBProgressHUD.m */,
1315DD72178044770032507D /* Supporting Files */,
);
path = MBProgressHUD;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D286A7481518C70F00E13FB8 /* MBProgressHUD */ = {
isa = PBXNativeTarget;
buildConfigurationList = D286A7561518C70F00E13FB8 /* Build configuration list for PBXNativeTarget "MBProgressHUD" */;
buildPhases = (
D286A7451518C70F00E13FB8 /* Sources */,
D286A7461518C70F00E13FB8 /* Frameworks */,
1315DD7517804C970032507D /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = MBProgressHUD;
productName = MBProgressHUD;
productReference = D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D286A7401518C70E00E13FB8 /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = MB;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Matej Bukovinski";
};
buildConfigurationList = D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D286A73E1518C70E00E13FB8;
productRefGroup = D286A74A1518C70F00E13FB8 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D286A7481518C70F00E13FB8 /* MBProgressHUD */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D286A7451518C70F00E13FB8 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D286A7531518C70F00E13FB8 /* MBProgressHUD.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D286A7541518C70F00E13FB8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
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;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
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.3;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
D286A7551518C70F00E13FB8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
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;
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
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.3;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
D286A7571518C70F00E13FB8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/MBProgressHUD.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
D286A7581518C70F00E13FB8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DSTROOT = /tmp/MBProgressHUD.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D286A7541518C70F00E13FB8 /* Debug */,
D286A7551518C70F00E13FB8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D286A7561518C70F00E13FB8 /* Build configuration list for PBXNativeTarget "MBProgressHUD" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D286A7571518C70F00E13FB8 /* Debug */,
D286A7581518C70F00E13FB8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D286A7401518C70E00E13FB8 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MBProgressHUD.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
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">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D286A7481518C70F00E13FB8"
BuildableName = "libMBProgressHUD.a"
BlueprintName = "MBProgressHUD"
ReferencedContainer = "container:MBProgressHUD.xcodeproj">
</BuildableReference>
</MacroExpansion>
<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>
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:MBProgressHUD.xcodeproj">
</FileRef>
<FileRef
location = "group:Demo/HudDemo.xcodeproj">
</FileRef>
<FileRef
location = "group:README.mdown">
</FileRef>
<FileRef
location = "group:LICENSE">
</FileRef>
<FileRef
location = "group:MBProgressHUD.podspec">
</FileRef>
</Workspace>
+86 -40
View File
@@ -1,55 +1,101 @@
MBProgressHUD
=============
# MBProgressHUD [![Build Status](https://travis-ci.org/matej/MBProgressHUD.svg?branch=master)](https://travis-ci.org/matej/MBProgressHUD)
MBProgressHUD is an iPhone 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://grab.by/grabs/cfab318151331b5f0dfce573bf7ba669.png)](http://grab.by/grabs/64efd841e78d3724f4b9e6cdf1a9be58.png)
[![](http://grab.by/grabs/051c768a35a3a8dcce5162f6cde4bb6b.png)](http://grab.by/grabs/37edc22342fcafee5cb6480f1114e882.png)
[![](http://grab.by/grabs/11695987da568e635c4bfb817c247e11.png)](http://grab.by/grabs/11295a7e38b0cfda85b173612f03c2b6.png)
[![](http://grab.by/grabs/e977015442945e6596d695d55c14bc23.png)](http://grab.by/grabs/b72d772d1b578fe78b40ae30cd6ac66e.png)
[![](http://grab.by/grabs/563906b03b1e9dee499d71af4f193748.png)](http://grab.by/grabs/b2608a107117932ea8c8f5304c34e9e2.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/1-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/1.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/2-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/2.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/3-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/3.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/4-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/4.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/5-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/5.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/6-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/6.png)
[![](http://dl.dropbox.com/u/378729/MBProgressHUD/7-thumb.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
Usage
=====
You will need the latest developer tools in order to build MBProgressHUD. Old Xcode versions might work, but compatibility will not be explicitly maintained.
A full Xcode demo project is included in the Demo directory. This should give you an idea how to use the class.
## Adding MBProgressHUD to your project
Change-log
==========
### Cocoapods
Version 0.33 @ 27.03.10
- Custom view operation mode added.
- Fixed a memory leak.
[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project.
Version 0.32 @ 4.01.10
- Added minShowTime, graceTime, xOffset, yOffset.
- Various fixes.
1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.9.1'`
2. Install the pod(s) by running `pod install`.
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
Version 0.31 @ 8.10.09
- Fix for touch through during the fade-out animation.
### Source files
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.
Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.
Version 0.2 @ 21.7.09
- Added determinate progress mode and switching capabilities between determinate and indeterminate modes.
- Various bugfixes.
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"`.
Version 0.11 @ 2.6.09.
- Updated labelText and detailsLabelText properties to support text modifications while the HUD is being shown.
### Static library
Version 0.1 @ 2.4.09
- Initial release.
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, 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).
## License
This code is distributed under the terms and conditions of the [MIT license](LICENSE).
## Change-log
A brief summary of each MBProgressHUD release can be found on the [wiki](https://github.com/matej/MBProgressHUD/wiki/Change-log).