Skip to content

Commit 121ced5

Browse files
committed
Added basic usage to readme: Issue #96, #99
1 parent a0a1074 commit 121ced5

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

README.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,53 @@ A set of progess view based off of the same superclass. Allowing easy switching
9696

9797
<img src="https://raw.github.com/Marxon13/M13ProgressSuite/master/ReadmeResources/StripedIndeterminate.gif">
9898

99-
Known Bugs:
100-
------------
101-
* When the HUD is set to apply the iOS 7 style blur to the HUD background, it doesn't work. The screenshot of the superview is not taken in the proper CGRect. It seems to work when the mask type is set to iOS 7 Blur, I beleive it is because the CGRectOrigin is {0, 0}.
99+
Progress View Usage:
100+
--------------------
101+
102+
All progress bars follow the same general usage:
103+
104+
```
105+
// Create the progress view.
106+
M13ProgressViewBar *progressView = [[M13ProgressViewBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 5.0)];
107+
108+
// Configure the progress view here.
109+
110+
// Add it to the view.
111+
[self.view addSubview: progressView];
112+
113+
// Update the progress as needed
114+
[progressView setProgress: 0.1 animated: YES];
115+
116+
```
117+
118+
HUD Usage:
119+
----------
120+
121+
```
122+
// Create the HUD
123+
M13ProgressHUD *HUD = [[M13ProgressHUD alloc] initWithProgressView:[[M13ProgressViewRing alloc] init]];
124+
125+
// Configure the progress view
126+
HUD.progressViewSize = CGSizeMake(60.0, 60.0);
127+
HUD.animationPoint = CGPointMake([UIScreen mainScreen].bounds.size.width / 2, [UIScreen mainScreen].bounds.size.height / 2);
128+
129+
// Add the HUD to the window. (Or any UIView)
130+
UIWindow *window = ((AppDelegate *)[UIApplication sharedApplication].delegate).window;
131+
[window addSubview:HUD];
132+
133+
// Show the HUD
134+
[HUD show:YES];
135+
136+
//Update the HUD progress
137+
[HUD setProgress:0.5 animated:YES];
138+
139+
// Update the HUD status
140+
HUD.status = @"Processing";
141+
142+
// Hide the HUD
143+
[HUD show:NO];
144+
145+
```
102146

103147
Contact Me:
104148
-------------

0 commit comments

Comments
 (0)