AlertAction position

LarrySeymourLarrySeymour USMember ✭✭

Is it possible to have an alert action appear at the top of my screen instead of the bottom.
i'm using it from off a NavigationItem.SetRightBarButtonItem
so far i have
NavigationItem.SetRightBarButtonItem(new UIBarButtonItem(UIBarButtonSystemItem.Action, (sender, args) =>
{
UIAlertController dropMenu = new UIAlertController();
dropMenu.AddAction(UIAlertAction.Create("Mail", UIAlertActionStyle.Default, (Action) =>
{
try
{
appD.type = "Mail";
appD.user = _user;
UIStoryboard sb = UIStoryboard.FromName("Main", null);
var view = sb.InstantiateViewController("MailViewController") as MailViewController;
appD.navCtrl.PushViewController(view, true);
}
catch (Exception e)
{
Console.WriteLine(e.InnerException.Message);
}
}));

            dropMenu.AddAction(UIAlertAction.Create("User", UIAlertActionStyle.Default, (Action) =>
            {
                try
                {
                    appD.type = "Edit";
                    appD.user = _user;
                    UIStoryboard sb = UIStoryboard.FromName("Main", null);
                    var view = sb.InstantiateViewController("SignupViewController") as SignupViewController;
                    appD.navCtrl.PushViewController(view, true);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.InnerException.Message);
                }
            }));

            dropMenu.AddAction(UIAlertAction.Create("Sign Out", UIAlertActionStyle.Default, (Action) =>
            {
                try
                {
                    appD.type = "";
                    appD.user = null;
                    UIStoryboard sb = UIStoryboard.FromName("Main", null);
                    var view = sb.InstantiateViewController("ViewController") as ViewController;
                    appD.navCtrl.PushViewController(view, true);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.InnerException.Message);
                }
            }));
            dropMenu.AddAction(UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, (Action) => Console.WriteLine("Cancewl Pressed.")));

            this.PresentViewController(dropMenu, true, null);
        }), true);
Tagged:
Sign In or Register to comment.