我有非常大的图形Mac应用程序,现在我在10.9 GM的控制台上收到了很多以下消息.
<Error>: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
Run Code Online (Sandbox Code Playgroud)
我注意到这些消息在调用[NSApp nextEventMatchingMask:untilDate inMode:dequeue]之后出现在调试器中,但我认为原因在于其他一些地方.但我有太多地方使用Cocoa Graphics.我在10.9之前没有收到这种消息.
如何检测NaN传递给CoreGraphics API的位置?
在我的Cocoa应用程序中,我需要创建包含具有透明度的渐变的PDF.目前,PDF 1.4可用于Cocoa应用程序以进行打印或导出为PDF.
但是这个版本有一些限制,例如,我无法创建具有透明度的渐变.
是否可以切换默认的PDF渲染引擎或以某种方式创建包含透明度渐变的PDF文件?
我在可可应用程序中使用NSTextView。我按Option-E,文本视图在黄色突出显示框中显示了尖锐的重音,表示它是标记的文本,而不是最终输入。当我键入下一个字符时,文本视图必须将其显示为单个重音字符,但不是。例如
为什么?
更新:这是我的步骤:
