How to acquire a file path using objective c
问题 I want a function which just returns the full file path of a file selected in finder. I am currently have this function: + (NSString*)choosePathWindow:(NSString*)title buttonTitle:(NSString*)buttonTitle allowDir:(BOOL)dir allowFile:(BOOL)file{ [NSApp activateIgnoringOtherApps:YES]; NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel setLevel:NSFloatingWindowLevel]; [openPanel setAllowsMultipleSelection:NO]; [openPanel setCanChooseDirectories:dir]; [openPanel setCanCreateDirectories