public Task <bool> ShowYesNoAlert(string message, string yesButtonText, string noButtonText) { var tcs = new TaskCompletionSource <bool>(); var popupOverlay = new CustomPopUpView(message, yesButtonText, noButtonText, new CGSize(300, 150)); popupOverlay.YesButtonClicked += () => { tcs.TrySetResult(true); }; popupOverlay.NoButtonClicked += () => { tcs.TrySetResult(false); }; popupOverlay.ShowPopUp(true, null); return(tcs.Task); }
public void ShowWarningAlert(string message, string warningButtonText) { var popupOverlay = new CustomPopUpView(message, warningButtonText, new CGSize(300, 150), isWarning: true); popupOverlay.ShowPopUp(true, null); }