예제 #1
0
        //Alert message
        public void AlertMessage()
        {
            //Create alert
            UIAlertController QuestionErrorAlert;

            QuestionErrorAlert = UIAlertController.Create("Cannot start New Game", "Must have at least 15 questions to start", UIAlertControllerStyle.Alert);

            //Create cancel button
            UIAlertAction CancelButton = UIAlertAction.Create("Okay", UIAlertActionStyle.Cancel, null);

            //Show cancel button
            QuestionErrorAlert.AddAction(CancelButton);

            //Show the alert
            this.PresentViewController(QuestionErrorAlert, false, null);
        }
        //Error message
        public void ErrorMessage(string error, string details)
        {
            //Create alert
            UIAlertController QuestionErrorAlert;

            QuestionErrorAlert = UIAlertController.Create(error, details, UIAlertControllerStyle.Alert);

            //Create cancel button
            UIAlertAction CancelButton = UIAlertAction.Create("Okay", UIAlertActionStyle.Cancel, null);

            //Show cancel button
            QuestionErrorAlert.AddAction(CancelButton);

            //Show the alert
            this.PresentViewController(QuestionErrorAlert, false, null);
        }