Objective c 如何使用NSOpenPanel选择带有ext“的文件;邮政编码001“;

Objective c 如何使用NSOpenPanel选择带有ext“的文件;邮政编码001“;,objective-c,macos,cocoa,nsopenpanel,Objective C,Macos,Cocoa,Nsopenpanel,我使用NSopenPanel选择具有公共ext的文件,例如: openDlg.allowedFileTypes = [NSArray arrayWithObjects: @"zip", nil]; 但是如何选择名为“test.zip.001”的文件呢 allowedFileTypes设置为@“001”和@“zip.001”都不起作用。您是否尝试了NSOpenSavePanelDelegate的方法-(BOOL)panel:(id)sender shouldEnableURL:(NSURL*)u

我使用
NSopenPanel
选择具有公共ext的文件,例如:

openDlg.allowedFileTypes = [NSArray arrayWithObjects: @"zip", nil];
但是如何选择名为“test.zip.001”的文件呢


allowedFileTypes
设置为@“001”@“zip.001”都不起作用。

您是否尝试了
NSOpenSavePanelDelegate
的方法
-(BOOL)panel:(id)sender shouldEnableURL:(NSURL*)url
?抱歉,如何实现该委托?我是obj cOk的新手,这个代表工作!