Skip to content

Commit

Permalink
ios: remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher J. Brody committed Oct 3, 2018
1 parent a9409c5 commit 328242e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ios/CDVNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
#ifdef __IPHONE_8_0
if (NSClassFromString(@"UIAlertController")) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];

if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.3) {
CGRect alertFrame = [UIScreen mainScreen].applicationFrame;

if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
// swap the values for the app frame since it is now in landscape
CGFloat temp = alertFrame.size.width;
alertFrame.size.width = alertFrame.size.height;
alertFrame.size.height = temp;
}

alertController.view.frame = alertFrame;
}

Expand Down Expand Up @@ -83,18 +83,18 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
[weakNotif.commandDelegate sendPluginResult:result callbackId:callbackId];
}]];
}

if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) {

[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.text = defaultText;
}];
}

if(!alertList)
alertList = [[NSMutableArray alloc] init];
[alertList addObject:alertController];

if ([alertList count]==1) {
[self presentAlertcontroller];
}
Expand All @@ -109,19 +109,19 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];

alertView.callbackId = callbackId;

for (int n = 0; n < count; n++) {
[alertView addButtonWithTitle:[buttons objectAtIndex:n]];
}

if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) {
alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField* textField = [alertView textFieldAtIndex:0];
textField.text = defaultText;
}

[alertView show];
#ifdef __IPHONE_8_0
}
Expand Down

0 comments on commit 328242e

Please sign in to comment.