/// <summary>
        /// Creates new simple alert and immediately shows it.
        /// </summary>
        /// <param name="title">Alert title.</param>
        /// <param name="message">Alert message.</param>
        public static void ShowMessage(string title, string message)
        {
            ISN_UIAlertController alert         = new ISN_UIAlertController(title, message, ISN_UIAlertControllerStyle.Alert);
            ISN_UIAlertAction     defaultAction = new ISN_UIAlertAction("Ok", ISN_UIAlertActionStyle.Default, () => {
                //Do something
            });

            alert.AddAction(defaultAction);
            alert.Present();
        }
Esempio n. 2
0
 /// <summary>
 /// Attaches an action object to the alert or action sheet.
 /// If your alert has multiple actions, the order in which you add those actions determines their order in the resulting alert or action sheet.
 /// </summary>
 /// <param name="action">
 /// The action object to display as part of the alert. Actions are displayed as buttons in the alert.
 /// The action object provides the button text and the action to be performed when that button is tapped.
 /// </param>
 public void AddAction(ISN_UIAlertAction action)
 {
     m_actions.Add(action);
 }