向 IKSaveOptions 添加选项?
我有一个 ImageKit 程序需要能够保存图像,因此我使用 IKSaveOptions 附件视图,以允许用户选择文件类型等。
但是,我想删除一些选项,并添加一个TIFF 面板上的复选框。或者,我想添加一种文件类型。但是我不知道如何做到这一点。我假设我必须对 IKSaveOptions 进行子类化并覆盖某些内容,但我找不到任何示例代码或文档来告诉我如何执行此操作。
ETA:特别是,我需要能够允许用户区分多页 tiff 和一堆附加页码的单页 tiff。
ETA:所以,SO 告诉我“距离赏金到期只有几个小时,所以我应该选择一个答案”但是......没有答案! (你可能会认为 SO 足够聪明,能够看到这一点,但是哦,好吧 B-)
I have an ImageKit program that needs to be able to save images, so I'm using the IKSaveOptions accessory view, to allow the user to choose a file type, etc.
However, I want to remove some of the options, and add a checkbox to the panel for TIFFs. Alternatively, I want to add a type of file. However I can't figure out how to do this. I assume I'm going to have to subclass off of IKSaveOptions and over-ride something, but I can't find any sample code or documentation that tells me how to do this.
ETA: In particular, I need to be able to allow the user to distinguish between multi-page tiff, and a bunch of single-page tiffs with a page-number appended.
ETA: So, SO is telling me "I have only a few hours before the bounty expires so I should choose an answer" But ... there are no answers! (You'd think that SO would be smart enough to see that, but oh well B-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IKSaveOptions继承自NSObject。真正的附件视图是内部构建的,无法通过公共 API 访问:
因此,最好的选择是使用二十一点和妓女构建自己的保存对话框附件视图。您可以从界面生成器中的 NSView 自定义视图开始。那么简单来说就是:
IKSaveOptions is inherited from NSObject. Real accessory view is built internally and is not accessible with public API:
So your best bet is to build your own save dialog accessory view with blackjack and hookers. You can start with NSView custom view in interface builder. Then it is simply:
VB 是正确的,但是在 IKSaveOptions 对象设置后,您可以从 NSSavePanel 获取附件视图。
VB is right, but you can get the accessory view from the NSSavePanel after it has been set by the IKSaveOptions object.