NSToolbarItem:“确保此工具栏项有有效的框架/最小/最大尺寸”? [英] NSToolbarItem: "Make sure this toolbar item has a valid frame/min/max size"?

查看:317
本文介绍了NSToolbarItem:“确保此工具栏项有有效的框架/最小/最大尺寸”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为升级到Mac OS Sierra和新的XCode版本,我每次为每个NSToolbarItems启动我的应用程序时收到以下错误:

Since upgrading to Mac OS Sierra and the new XCode version I get the following error every time I launch my application for every one of the NSToolbarItems:

Example 1:
2016-09-29 12:46:58.659879 AppTest[] NSToolbarItem (<NSToolbarItem: >) had to adjust the size of <NSPopUpButton: > from {130, 26} to the expected size of {132, 27}. Make sure that this toolbar item view has a valid frame/min/max size. This is an app bug, please do not file a bug against AppKit or NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint
Example 2:
2016-09-29 12:46:58.666074 AppTest[] NSToolbarItem (<NSToolbarItem: >) had to adjust the size of <NSButton: > from {60, 25} to the expected size of {62, 27}. Make sure that this toolbar item view has a valid frame/min/max size. This is an app bug, please do not file a bug against AppKit or NSToolbar! Break on _NSToolbarAdjustedBorderedControlSizeBreakpoint

我试图在StoryBoard中改变大小,没有运气,

I tried messing around in StoryBoard changing the size with no luck, when I searched around I found a couple of people having this issue as well with the new OS but no helpful answers.

任何人面临同样的问题,有任何建议吗?

Anyone facing the same issue, any advice?

非常感谢,

Marc

推荐答案

在这里找到答案:

http://cocoa-dev.apple.narkive.com/iSLaiCLR/strange-toolbar-item-error

总结:


我的选项有:

My options are:


  • 如上所述更改最大尺寸,并且工具栏项目可能会在前台显示错误尺寸;

  • Change the max size as above, and have toolbar items potentially appear the wrong size pre-Sierra;

忽略警告,应在每个版本中;

Ignore the warning and have everything appear as it should in each version;


$ b

Also note that:


I
认为我已经尝试过没有成功,直到我意识到
发生了什么:我编辑了值,然后关闭IB中的工具栏编辑器。
我现在意识到,更改没有被保存;当我重新打开
工具栏编辑器时,旧的值仍然显示。运行一次与
工具栏编辑器打开似乎已经作出了更改采取(是的,
我尝试清洗在各个阶段。)

I thought I'd already tried this without success, until I realized what was happening: I had edited the values, then closed the toolbar editor in IB. I've now realised that the changes were not being saved; when I reopened the toolbar editor, the old values were still showing. Running once with the toolbar editor open seems to have made the changes 'take". (And yes, I tried cleaning at various stages.)

这篇关于NSToolbarItem:“确保此工具栏项有有效的框架/最小/最大尺寸”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆