Repository: cordova-plugin-dialogs Updated Branches: refs/heads/master c173b511a -> f9252d634
CB-10727 Dialogs plugin has warnings on iOS Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/f9252d63 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/f9252d63 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/f9252d63 Branch: refs/heads/master Commit: f9252d63430dc6c18b6421d45139d672124c21bf Parents: c173b51 Author: EddyVerbruggen <eddyverbrug...@gmail.com> Authored: Mon Feb 29 13:14:19 2016 +0100 Committer: EddyVerbruggen <eddyverbrug...@gmail.com> Committed: Mon Feb 29 13:14:19 2016 +0100 ---------------------------------------------------------------------- src/ios/CDVNotification.m | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/f9252d63/src/ios/CDVNotification.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVNotification.m b/src/ios/CDVNotification.m index a4c95e9..1742285 100644 --- a/src/ios/CDVNotification.m +++ b/src/ios/CDVNotification.m @@ -40,7 +40,7 @@ static NSMutableArray *alertList = nil; - (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType { - NSUInteger count = [buttons count]; + int count = (int)[buttons count]; #ifdef __IPHONE_8_0 if (NSClassFromString(@"UIAlertController")) { @@ -63,8 +63,9 @@ static NSMutableArray *alertList = nil; __weak CDVNotification* weakNotif = self; for (int n = 0; n < count; n++) { - - UIAlertAction* action = [UIAlertAction actionWithTitle:[buttons objectAtIndex:n] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) + [alertController addAction:[UIAlertAction actionWithTitle:[buttons objectAtIndex:n] + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { CDVPluginResult* result; @@ -83,10 +84,7 @@ static NSMutableArray *alertList = nil; } [weakNotif.commandDelegate sendPluginResult:result callbackId:callbackId]; - - }]; - [alertController addAction:action]; - + }]]; } if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org