[ 
https://issues.apache.org/jira/browse/CB-7734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14234283#comment-14234283
 ] 

ASF GitHub Bot commented on CB-7734:
------------------------------------

Github user ginamdar commented on the pull request:

    
https://github.com/apache/cordova-plugin-dialogs/pull/39#issuecomment-65650770
  
    im not using text fields inside my projects but this works with dialogboxes 
on iOS8 without inputs fields 
    
    if (![self isAlertViewSupported]) {
            CDVAlertViewController *alert = [CDVAlertViewController 
alertControllerWithTitle:title
                                                                                
     message:message
                                                                              
preferredStyle:UIAlertControllerStyleAlert];
            alert.alertViewCtrlCallBackId = callbackId;
            NSUInteger count = [buttons count];
    
            for (int n = 0; n < count; n++) {
                UIAlertAction *actionWithTitle = [UIAlertAction 
actionWithTitle:[buttons objectAtIndex:n]
                                                                          
style:UIAlertActionStyleDefault
                                                                        
handler:^(UIAlertAction *action) {
                    CDVPluginResult*  result;
    
                    UITextField *textField = [alert.textFields firstObject];
    
                    if (textField) {
                        NSString *value0 = textField.text;
                        NSDictionary* info = @{
                                               @"buttonIndex":@(n),
                                               @"input1":(value0 ? value0 : 
[NSNull null])
                                               };
                        result = [CDVPluginResult 
resultWithStatus:CDVCommandStatus_OK
                                               messageAsDictionary:info];
                    }else{
    
                        result = [CDVPluginResult 
resultWithStatus:CDVCommandStatus_OK
                                                      messageAsInt:(int)(n + 
1)];
                    }
                    [self.commandDelegate sendPluginResult:result
                                                
callbackId:alert.alertViewCtrlCallBackId];
    
                }];
                [alert addAction:actionWithTitle];
            }
    
            if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) {
                [alert addTextFieldWithConfigurationHandler:^(UITextField 
*textField) {
                    textField.placeholder = defaultText ;
                }];
            }
            [self.viewController presentViewController:alert animated:YES 
completion:nil];
      }else{
       //existing ios7 and older code?
    }
    
    - (BOOL)isAlertViewSupported
    {
        if([[UIDevice currentDevice].systemVersion compare:@"8.0" 
options:NSNumericSearch] == NSOrderedDescending){
            return NO;
        }else{
            return YES;
        }
    }
    ...
    
    @implementation CDVAlertViewController
    
    @synthesize alertViewCtrlCallBackId;
    
    @end


> "navigator.notification.alert" or "navigator.notification.confirm" seem have 
> a "many words" issue
> -------------------------------------------------------------------------------------------------
>
>                 Key: CB-7734
>                 URL: https://issues.apache.org/jira/browse/CB-7734
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Dialogs
>    Affects Versions: 3.6.3
>         Environment: PGB 3.6.3 with the all latest core plugin
> https://build.phonegap.com/plugins
> ios 8.02 environment
>            Reporter: Colin Bau
>            Assignee: jcesarmobile
>              Labels: notification
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> Improvement 1
> according to this
> https://issues.apache.org/jira/browse/CB-6528
> a same problem just like the WP,ios have this problem too
> when the words is greater than one page
> it can't slide up and down 
> Improvement 2
> all words "center" problem,I think maybe "Left-aligned" is more Beautiful 
> (because when in Android,all words "Left-aligned")
> http://www.littlebau.com/ios_1.png
> Improvement 3
> all words looks like small and Vague (maybe in Chinese),is there any way 
> (maybe future) can let become more Clear ?
> http://www.littlebau.com/ios_1.png



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to