适用于OS X Cocoa的图像选择器或文件选择器



在我的应用程序中,我需要从文件系统中获取一个映像。我知道如何在iOS中实现,但不知道如何在OS X中实现。有没有像imagePicker或OSX的文件选择器这样的工具?需要帮助。

在iOS中,我使用这个:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

提前感谢!

在Mac上有一个IKPictureTaker,它的工作原理与UIImagePickerController类似。

https://developer.apple.com/documentation/quartz/ikpicturetaker

最新更新