2017-10-04 10 views

答えて

0

ActionSheet

// Create a new Alert Controller 
       UIAlertController actionSheetAlert = UIAlertController.Create("Action Sheet", "Select an item from below", UIAlertControllerStyle.ActionSheet); 

       // Add Actions 
       actionSheetAlert.AddAction(UIAlertAction.Create("Item One",UIAlertActionStyle.Default, (action) => Console.WriteLine ("Item One pressed."))); 

       actionSheetAlert.AddAction(UIAlertAction.Create("Item Two",UIAlertActionStyle.Default, (action) => Console.WriteLine ("Item Two pressed."))); 

       actionSheetAlert.AddAction(UIAlertAction.Create("Item Three",UIAlertActionStyle.Default, (action) => Console.WriteLine ("Item Three pressed."))); 

       actionSheetAlert.AddAction(UIAlertAction.Create("Cancel",UIAlertActionStyle.Cancel, (action) => Console.WriteLine ("Cancel button pressed."))); 

       // Required for iPad - You must specify a source for the Action Sheet since it is 
       // displayed as a popover 
       UIPopoverPresentationController presentationPopover = actionSheetAlert.PopoverPresentationController; 
       if (presentationPopover!=null) { 
        presentationPopover.SourceView = this.View; 
        presentationPopover.PermittedArrowDirections = UIPopoverArrowDirection.Up; 
       } 

       // Display the alert 
       this.PresentViewController(actionSheetAlert,true,null); 

UIAlertControllerからさらに詳しい情報:つまりhttps://developer.xamarin.com/recipes/ios/standard_controls/alertcontroller/

+0

、これは、ビルトインされていませんか? – GenericTeaCup

+0

内蔵! – TonyMkenu

+0

ダイアログを作成する可能性が組み込まれています。しかし、正確な項目 "Call"、 "Send message"、...の正確なダイアログは、手動で行う必要があります。それはあなたが組み込みの手段だと思いますか? – GenericTeaCup

関連する問題