向 IKSaveOptions 添加选项?

发布于 2024-08-25 11:03:45 字数 348 浏览 8 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感性不性感 2024-09-01 11:03:45

IKSaveOptions继承自NSObject。真正的附件视图是内部构建的,无法通过公共 API 访问:

@interface IKSaveOptions : NSObject
{
@private
    void *  _privateData;
    id      _saveOptionsView;
}

因此,最好的选择是使用二十一点和妓女构建自己的保存对话框附件视图。您可以从界面生成器中的 NSView 自定义视图开始。那么简单来说就是:

NSSavePanel *saveDialog = [NSSavePanel savePanel];
[saveDialog setAccessoryView:mySaveAccessoryView];

IKSaveOptions is inherited from NSObject. Real accessory view is built internally and is not accessible with public API:

@interface IKSaveOptions : NSObject
{
@private
    void *  _privateData;
    id      _saveOptionsView;
}

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:

NSSavePanel *saveDialog = [NSSavePanel savePanel];
[saveDialog setAccessoryView:mySaveAccessoryView];
凡尘雨 2024-09-01 11:03:45

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文