Xamarin iOS 跳出提示訊息的功能 (UIAlertView)
1.單純顯示訊息:
new UIAlertView("", "訊息內容", null, "OK", null).Show();
2. 有選項的訊息
var Confirm = new UIAlertView("Confirmation", "Would you like to exit app ?", null, "Yes", "No");
Confirm.Show();
Confirm.Clicked += (object senders, UIButtonEventArgs es) =>
{
if (es.ButtonIndex == 0)
{
NSThread.Exit();
}
else
{
this.NavigationController.PopViewController(true);
}
};