Xamarin Development Company Experts Displaying Uiactionsheet In Xamarin Ios
Xamarin development company experts will make you learn about the steps to display ActionSheet in same as in Xamarin iOS. Read this post and find how professionals display UIActionSheet in Xamarin iOS.
In this article I am showing you how to display ActionSheet(UIActionSheet) in same as native iPhone and iPad in Xamrin iOS.
Action sheets is a consist of a bunch of options that the user can select from, and this is used in almost applications. In Xamarin there is a UIActionSheet available but we cannot display similar as native iPhone and iPad.
1. Create a new Blank App(Xamarin.Forms Portable) application
2. Create a new Xml page DemoPage.
3. In the “App.cs” file set Main page as DemoPage.
4. Create a Service folder in Portable project and create a “IActionSheetServie.cs” interface.
Add following content inside a “IActionSheetServie.cs” file.
5. In the iOS project create a new Service folder and add “ActionSheetService.cs” file.
Add following content inside “ActionSheetService.cs” file.
6. In the “DemoPage.xaml” file put following code.
When user click on “Show ActionSheet” button we are calling “ShowPopOverActionSheet” method which is implemented in “ActionSheetService.cs” service of iOS project. Currently we are passing three buttons “Button 1”, “Button 2”, and “Button 3” which is display in ActionSheet popup as button text, we can add N number of buttons which we want to display in ActionSheet popup.
Do you have anything to ask related to Xamarin? Ask the experts of Xamarin development company who have shared this post for benefit of entire xamarin development community.