@@ -43,17 +43,17 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
4343#ifdef __IPHONE_8_0
4444 if (NSClassFromString (@" UIAlertController" )) {
4545 UIAlertController *alertController = [UIAlertController alertControllerWithTitle: title message: message preferredStyle: UIAlertControllerStyleAlert];
46-
46+
4747 if ([[[UIDevice currentDevice ] systemVersion ] floatValue ] < 8.3 ) {
4848 CGRect alertFrame = [UIScreen mainScreen ].applicationFrame ;
49-
49+
5050 if (UIInterfaceOrientationIsLandscape ([[UIApplication sharedApplication ] statusBarOrientation ])) {
5151 // swap the values for the app frame since it is now in landscape
5252 CGFloat temp = alertFrame.size .width ;
5353 alertFrame.size .width = alertFrame.size .height ;
5454 alertFrame.size .height = temp;
5555 }
56-
56+
5757 alertController.view .frame = alertFrame;
5858 }
5959
@@ -83,18 +83,18 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
8383 [weakNotif.commandDelegate sendPluginResult: result callbackId: callbackId];
8484 }]];
8585 }
86-
86+
8787 if ([dialogType isEqualToString: DIALOG_TYPE_PROMPT]) {
88-
88+
8989 [alertController addTextFieldWithConfigurationHandler: ^(UITextField *textField) {
9090 textField.text = defaultText;
9191 }];
9292 }
93-
93+
9494 if (!alertList)
9595 alertList = [[NSMutableArray alloc ] init ];
9696 [alertList addObject: alertController];
97-
97+
9898 if ([alertList count ]==1 ) {
9999 [self presentAlertcontroller ];
100100 }
@@ -109,19 +109,19 @@ - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:
109109 delegate: self
110110 cancelButtonTitle: nil
111111 otherButtonTitles: nil ];
112-
112+
113113 alertView.callbackId = callbackId;
114-
114+
115115 for (int n = 0 ; n < count; n++) {
116116 [alertView addButtonWithTitle: [buttons objectAtIndex: n]];
117117 }
118-
118+
119119 if ([dialogType isEqualToString: DIALOG_TYPE_PROMPT]) {
120120 alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
121121 UITextField* textField = [alertView textFieldAtIndex: 0 ];
122122 textField.text = defaultText;
123123 }
124-
124+
125125 [alertView show ];
126126#ifdef __IPHONE_8_0
127127 }
0 commit comments