0

I'm developing an iOS app with Xamarin.iOS.

I'm trying to put a contact icon in my Navigationitem. According to the Apple developer docs(https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/system-icons/) you have to use UIApplicationShortcutIconType.Contact.

When i'm using this I get the reply icon in my navigation bar.

Reply icon in navigation bar

And it should be this: Contact icon

Here's my code:

NavigationItem.Title = "Menu";
        NavigationItem.HidesBackButton = true;
        var contactbutton = (UIBarButtonSystemItem)UIApplicationShortcutIconType.Contact;
        NavigationItem.RightBarButtonItem = new UIBarButtonItem(contactbutton);
        NavigationController.NavigationBarHidden = false;

Does anyone have an idea what's the problem in this case.

1 Answers1

0

As you read from the documentation the UIApplicationShortcutIconType is Home Screen Quick Action Icons used for 3D touch shortcuts. We can not use it for Navigation Bar and Toolbar Icons as UIBarButtonSystemItem.

If you do want to use system style. You can only try UIBarButtonSystemItem here.

Also you can see the thread below. It posts some references we can't do this: https://stackoverflow.com/a/43063432/8354952

Anonymous
  • 6,068
  • 1
  • 9
  • 52