Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

IOS UIMenuController UIMenuItem, how to determine item selected with generic selector method

prakash511prakash511 Member ✭✭
edited December 2020 in Xamarin.iOS

how to know the selected item with generic selector method in Xamarin.iOS

        var _menu = UIMenuController.SharedMenuController;
        var iterm = new UIMenuItem("John", new ObjCRuntime.Selector("MenuItemAction:"));
        _menu.MenuItems = new[] { iterm };
        _menu.SetTargetRect(new CGRect(10, 10, 100, 100), _nativeControl);
        _menu.MenuVisible = true;

private void MenuItemAction(UIMenuController controller)
  // how to know the selected item here.
Sign In or Register to comment.