在Cocoa中,NSTextView文本和边框之间的边距相当浅.有没有办法指定一个填充(文本和视图边界之间的距离),NSTextView而不诉诸所有者绘图?
文档只是声明setAutosavingDelay在共享文档控制器上设置为> 0但应该在调用之后
[[NSDocumentController sharedDocumentController] setAutosavingDelay:2.0];
Run Code Online (Sandbox Code Playgroud)
在我的控制器中,自动保存似乎不起作用:我既没有看到任何内容~/Library/Autosave Information/,也没有看到
[[[NSDocumentController sharedDocumentController] currentDocument] autosavedContentsFileURL]
Run Code Online (Sandbox Code Playgroud)
初始化.
请注意,在我的应用程序中,正常加载和保存工作正常(keyedarchivers,我的文档的基于nscoding的类等).