Skip to content

UIMenu.Identifier should probably be a string and not an enum #14177

@PureWeen

Description

@PureWeen

The UIMenu.Identifier property is an enum which makes custom identifiers or generated ones unreachable.

image

If you create a new menu with the following code

var titleMenu = UIMenu.Create("Title", new UIMenuElement[0]);

The titleMenu.Identifier property will be set to UIMenuIdentifier.None

That means the following code will fail

MenuBuilder
	.InsertChildMenuAtStart(menuContainer, titleMenu.Identifier);

In order to get the string identifier that you need to use with IUIMenuBuilder you have to retrieve it via a selector.

(NSString)titleMenu.PerformSelector(new Selector("identifier"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-bindingsbreaking-changeIf an issue or a pull request represents a breaking change

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions