You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.mdown
+20-25Lines changed: 20 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,4 @@
1
-
MBProgressHUD
2
-
=============
3
-
-------------
1
+
# MBProgressHUD
4
2
5
3
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.
6
4
@@ -12,9 +10,7 @@ MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an in
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:
20
16
@@ -24,21 +20,25 @@ MBProgressHUD works on any iOS version and is compatible with both ARC and non-A
24
20
25
21
You will need LLVM 3.0 or later in order to build MBProgressHUD.
26
22
27
-
------------------------------------
28
-
Adding MBProgressHUD to your project
29
-
====================================
23
+
## Adding MBProgressHUD to your project
30
24
31
-
Source files
32
-
------------
25
+
### Cocoapods
33
26
34
-
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.
27
+
[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project.
35
28
36
-
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.
29
+
1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.5'`
30
+
2. Install the pod(s) by running `pod install`.
31
+
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
32
+
33
+
### Source files
34
+
35
+
Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.
36
+
37
+
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.
37
38
2. Open your project in Xcode, than drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
38
39
3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`.
39
40
40
-
Static library
41
-
--------------
41
+
### Static library
42
42
43
43
You can also add MBProgressHUD as a static library to your project or workspace.
44
44
@@ -47,9 +47,7 @@ You can also add MBProgressHUD as a static library to your project or workspace.
47
47
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.
48
48
4. Include MBProgressHUD wherever you need it with `#import <MBProgressHUD/MBProgressHUD.h>`.
49
49
50
-
-----
51
-
Usage
52
-
=====
50
+
## Usage
53
51
54
52
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.
55
53
@@ -93,15 +91,12 @@ You should be aware that any HUD updates issued inside the above block won't be
93
91
94
92
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).
95
93
96
-
-------
97
-
License
98
-
=======
99
94
100
-
This code is distributed under the terms and conditions of the MIT license.
95
+
## License
96
+
97
+
This code is distributed under the terms and conditions of the [MIT license](LICENSE).
0 commit comments