Home / IOS Development / ios – UIBarButtonItem works, but not visible with Xcode11 and Xcode12

ios – UIBarButtonItem works, but not visible with Xcode11 and Xcode12



After migrating our app to Xcode12 from Xcode10, we see an issue with UIBarButtonItems. Some of these are not visible, but still work.

We could target more specifically at the following:

  • Xcode1
    0.3 on iOS12: no problem
  • Xcode10.3 on iOS13 through release: no issues
  • Xcode10.3 on iOS14 through release: no issues
  • Xcode11.7 on iOS12: no issues
  • Xcode11.7 on iOS13: the problem is there
  • Xcode12.0.1 on iOS12: no problem
  • Xcode12.0.1 on iOS13: the problem is there
  • Xcode12.0.1 on iOS14: the problem is there
  • The problem appears either in troubleshooting or in publishing
  • The problem does not appear when we run the app from Xcode
  • The problem only appears when we quit the app and restart it from the device directly
  • The problem only appears with UIBarButtonItem as the system element with icon, for example: Update, Add, …
  • The problem does not appear with UIBarButtonItem as the system element with text, for example: Edit, Close, …
  • The problem does not appear with UIBarButtonItem being customized with image from assets
  • The problem also appears if I make the UIBarButtonItem system programmatic

When viewing the “hierarchy view”, the item and icon are there, but not displayed on the device. We see no difference when the item is displayed or not which can help you understand the problem.

Below the screen are:

  1. Storyboard
  2. Problem on iPad after launch from the icon
  3. See the hierarchy for the problem

More screenshots (comparison) are available here: https://imgur.com/a/7Dcyvir

Storyboard
Problem on iPad after launch from the icon
See the hierarchy for the problem

Is there any chance that someone has seen a similar behavior with Xcode11 or Xcode12? Any idea what we can try, or if there is an Xcode issue that needs to be reported to be resolved?

Thanks in advance for your help!


Source link