MessageDlg('Choose a button:', System.UITypes.TMsgDlgType.mtInformation,
    [
      System.UITypes.TMsgDlgBtn.mbYes,
      System.UITypes.TMsgDlgBtn.mbNo,
      System.UITypes.TMsgDlgBtn.mbCancel
    ], 0,
    procedure(const AResult: TModalResult)
    begin
      if AResult = mrYES then
         ShowMessage('You chose Yes') else
      if AResult = mrNo then
         ShowMessage('You chose No') else
      if AResult = mrCancel then
         ShowMessage('You chose Cancel');
    end);
InputQuery('Input', ['Name'], [''],
  procedure(const AResult: TModalResult; const AValues: array of string)
  begin
    if AResult = mrOk then
      Showmessage(AValues[0]);
  end);

更新:

下面代码 Android 实机没问题,但在 iOS 实机没有动作。

 

MessageDlg('Choose a button:', System.UITypes.TMsgDlgType.mtInformation, mbOKCancel, 0,
  procedure(const AResult: TModalResult)
  begin
       if AResult = mrOk then
          ShowShareSheetAction1.ExecuteTarget(Sender); // iOS 实机没有动作 (没有当机)
  end);

 

相关文章:

  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2021-09-13
  • 2021-11-23
  • 2021-10-24
猜你喜欢
  • 2022-12-23
  • 2021-07-08
  • 2022-03-04
  • 2022-12-23
相关资源
相似解决方案