Collection TextField and Keyboard

the done button is added programmatically in the FireMonkey framework which hooks onto the virtual keyboard. (FMX.VirtualKeyboard.iOS.pas) this hooking only works for FireMonkey controls.


     if not Assigned(FHideButton) then
      begin
        FHideButton := TUIBarButtonItem.Create;
        FHideButton.setTitle(StrToNSStr(SEditorDone));
        FHideButton.setStyle(UIBarButtonItemStyleDone);
        FHideButton.setTarget(FKeyboardHandler.GetObjectID);
        FHideButton.setAction(sel_getUid('HideVirtualKeyboard'));
      end;

procedure TKeyboardEventHandler.HideVirtualKeyboard;
begin
  try
    Screen.ActiveForm.Focused := nil;
  except
    Application.HandleException(Screen.ActiveForm);
  end;
end;

It's unclear how this could be solved on our side, because the hooking shouldn't be necessary when using native controls.

Kind Regards, 
Pieter

Pieter Scheldeman2015-02-27 10:30:46