Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Learn more Got it

Xamarin Development Company Experts Displaying Uiactionsheet In Xamarin Ios

Published 5 years ago

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.

Read more

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.

Xamarin Development

Xamarin Development

Rosina De Palma (Nex Mobility)

Technical Writer at Nex Mobility. Having more than6 years of experience in writing especially for Android and iOS apps and development.

Got wisdom to pour?

500-

Tags

Xamarin, Xamarin development
Tweet
0
Like deMilked on Facebook
Want more milk?
Hit like for a daily artshake!
Don't show this - I already like Demilked