Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

DisplayActionSheet Popup not opening in xamarin IOS Project

$
0
0

I have implemented xamarin project using MVVM. I wrote button click command in view model. I am trying to open a Displayactionsheet using below code on the button click but Actionsheet is not opening in IOS but in Android it is working fine. If I put the same code in View.cs file then it is working fine in IOS as well. But if I put same code in viewmodel why Action sheet is not opening?

                String[] LogInOptions = {"Option1", "Option2"};
                var action = await App.Current.MainPage..DisplayActionSheet("Log In","Cancel","",LogInOptions);
                switch(action) {
                case "Option1" : {   
                        break;    }
                case "Option2" : {
                        break;  }
                                       }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>