Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2384

Add new iOS Project Setting to suppress the form accessory bar above the keyboard

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: cordova-ios
    • Labels:
      None

      Description

      See: http://stackoverflow.com/questions/7904892/remove-form-assistant-from-keyboard-in-iphone-standalone-web-app

      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
      
      -(void)keyboardDidShow:(NSNotification*)notif
      {
          NSArray *array = [[UIApplication sharedApplication] windows];
      
          for (UIWindow* wind in array) {
              for (UIView* currView in wind.subviews) {
                  if ([[currView description] hasPrefix:@"<UIPeripheralHostView"]) {
                      for (UIView* perView in currView.subviews) {
                          if ([[perView description] hasPrefix:@"<UIWebFormAccessory"]) {
                              [perView setHidden:YES];
                          }
                      }
      
                  }
              }
          }
      }
      

      Suggested name for the setting: HideKeyboardFormAccessoryBar with a default of false

        Attachments

          Activity

            People

            • Assignee:
              shazron Shazron Abdullah
              Reporter:
              shazron Shazron Abdullah
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: