If you’ve ever seen this Xcode complain about that the plain style for UIBarButtonItem is unsupported in a navigation item you know that it can be a nuisance to narrow down which button item has the unsupported style, especially in larger projects.
Here’s some good news for you. It’s pretty easy to figure out what button is causing the warning. Heres how you do it:
- Build the project.
Find the issue in the build log & Show the Report Navigator to Find the Item identifier.
- Expand the warning.
- Copy the buttons identifier from the log. (The identifier will be an alphanumeric string composed of 8 characters broken into three parts. Something like this 7Ad-r9-nwv.)
- Paste into Xcode’s project search.
- The offending item will appear in the search results. Click on the search result.
- Change the button style to “
This works because Storyboard files are XML files under the hood. Even though Xcode renders them as fancy interfaces, you can actually edit them as plaintext if youd like to. (This is useful when youre trying to fix an issue thats causing Xcode to crash when it opens your storyboard. For example, a merge conflict.)