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

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0
    • cordova-ios
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: