The Xcode interface constructor resets the NSToolbarItem on its own, then complains about it

Since upgrading to Xcode 8 and Sierra, I get the following console error message when starting the application:

NSToolbarItem (NSToolbarItem: 0x608000121360) was supposed to set the size of NSButton: 0x608000140160 from {35, 25} to the expected size {37, 27}. Make sure this toolbar item has a valid frame size / min / max. This is an application error, please do not report an error with AppKit or NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint

I have a NSToolbarItemcontaining for this element NSButton. The button width is set to 35, and the height field is grayed out and disabled. The input element of the toolbar has a minimum size of 35 x 25 and a maximum size of 39 x 27 (I would like them to have the same value for min and max, but keep reading). I tried setting the min max toolbar item to the same either 35 x 25, 37 x 27 and 39 x 27, but in each case, after saving the file and switching to a new file, IB probably changed these values ​​to something a little different (increases the maximum width and height by 2, I think), and the storyboard file looks darker in the sidebar, indicating an unsaved change. Only when I start the project immediately after saving, the values ​​remain as indicated (and the console warning disappears).

I am very annoyed that I need to change these values ​​before each build. Why doesn't IB keep my values ​​and then complain about it?

+4
source share

Source: https://habr.com/ru/post/1657847/


All Articles