Skip to content

Commit

Permalink
Merge pull request #34 from sirnacnud/mbprogresshud
Browse files Browse the repository at this point in the history
Update MBProgressHUD to 1.1.0
  • Loading branch information
nicolasgomollon committed Feb 20, 2018
2 parents 9650882 + 66f88d2 commit 9433ea0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Classes/AccountsViewController.m
Expand Up @@ -656,7 +656,7 @@ - (void)fieldEditor:(FieldEditorViewController *)editor pressedButtonWithKey:(NS
NSDictionary *loginInfo = @{kAccountUsername: username, kAccountPassword: password};

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:vc.navigationController.view animated:YES];
hud.labelText = NSLocalizedString(@"Getting Access Token...", nil);
hud.label.text = NSLocalizedString(@"Getting Access Token...", nil);
[self getAccessTokenWithLogin:loginInfo];
} else if ([key isEqualToString:@"GenerateAccessTokenButton"]) {
FieldEditorViewController *vc = nil;
Expand All @@ -678,7 +678,7 @@ - (void)fieldEditor:(FieldEditorViewController *)editor pressedButtonWithKey:(NS
NSDictionary *loginInfo = @{kAccountUsername: username, kAccountPassword: password};

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:vc.navigationController.view animated:YES];
hud.labelText = NSLocalizedString(@"Generating Access Token...", nil);
hud.label.text = NSLocalizedString(@"Generating Access Token...", nil);
[self generateAccessTokenWithLogin:loginInfo];
} else if ([key isEqualToString:@"SelectVendorIDButton"]) {
FieldEditorViewController *vc = nil;
Expand All @@ -700,15 +700,15 @@ - (void)fieldEditor:(FieldEditorViewController *)editor pressedButtonWithKey:(NS
NSDictionary *loginInfo = @{kAccountUsername: username, kAccountPassword: password};

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:vc.navigationController.view animated:YES];
hud.labelText = NSLocalizedString(@"Fetching Vendor ID...", nil);
hud.label.text = NSLocalizedString(@"Fetching Vendor ID...", nil);
[self findVendorIDsWithLogin:loginInfo];
}
}

- (void)doExport {
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
hud.mode = MBProgressHUDModeDeterminateHorizontalBar;
hud.labelText = NSLocalizedString(@"Exporting", nil);
hud.label.text = NSLocalizedString(@"Exporting", nil);

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul), ^{
NSURL *documentsURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
Expand Down Expand Up @@ -760,7 +760,7 @@ - (void)doExport {
[reportExportQueue waitUntilAllOperationsAreFinished];

hud.mode = MBProgressHUDModeIndeterminate;
hud.labelText = NSLocalizedString(@"Compressing", nil);
hud.label.text = NSLocalizedString(@"Compressing", nil);

ZIPArchive *zipArchive = [[ZIPArchive alloc] initWithFileURL:exportedReportsZipFileURL];
[zipArchive addDirectoryToArchive:exportURL];
Expand Down Expand Up @@ -805,7 +805,7 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
} else if (alertView.tag == kAlertTagConfirmDelete) {
if (buttonIndex != [alertView cancelButtonIndex]) {
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
[hud setLabelText:NSLocalizedString(@"Deleting Account...", nil)];
hud.label.text = NSLocalizedString(@"Deleting Account...", nil);

ASAccount *account = self.selectedAccount;
[self performSelector:@selector(deleteAccount:) withObject:account afterDelay:0.1];
Expand Down
6 changes: 3 additions & 3 deletions Classes/GraphView.m
Expand Up @@ -135,13 +135,13 @@ - (void)lockScale:(UILongPressGestureRecognizer *)recognizer {
hud.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:(maxLocked ? @"Lock" : @"Unlock")]];
hud.mode = MBProgressHUDModeCustomView;
if (maxLocked) {
hud.labelText = NSLocalizedString(@"Scale locked", nil);
hud.label.text = NSLocalizedString(@"Scale locked", nil);
} else {
hud.labelText = NSLocalizedString(@"Scale unlocked", nil);
hud.label.text = NSLocalizedString(@"Scale unlocked", nil);
}
hud.userInteractionEnabled = NO;
[self addSubview:hud];
[hud show:YES];
[hud showAnimated:YES];

lockIndicatorView.hidden = !maxLocked;
if (!maxLocked) {
Expand Down
2 changes: 1 addition & 1 deletion Vendor/MBProgressHUD
Submodule MBProgressHUD updated 105 files

0 comments on commit 9433ea0

Please sign in to comment.