예제 #1
0
        protected void ShowErrorForNativeUIAlert(string v)
        {
            new Plugin.Threading.UIThreadRunInvoker().BeginInvokeOnUIThread
            (
                () =>
            {
                //            UIKit.UIAlertView alert = null;
                //            alert = new UIKit.UIAlertView
                //                            (
                //                                "WARNING",
                //                                v,
                //                                null,
                //                                "Ok",
                //                                null
                //                            );
                //alert.Show();
                var newAlert = new UIAlertController()
                {
                    Title   = "WARNING",
                    Message = v,
                };
                newAlert.AddAction(
                    UIAlertAction.Create(
                        "OK",
                        UIAlertActionStyle.Default,
                        null
                        ));

                newAlert.PresentViewController(newAlert, animated: true, completionHandler: null);
            }
            );
            return;
        }