在我的应用程序中,我需要从文件系统中获取图像。我知道如何在 iOS 中做到这一点,但不知道如何在 OS X 中做到这一点。 OS X 有没有像 imagePicker 或文件选择器这样的工具?需要帮助请。
在 iOS 中我使用这个:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
Run Code Online (Sandbox Code Playgroud)
提前致谢!
在 Mac 上有 IKPictureTaker,其工作方式与 UIImagePickerController 类似。
https://developer.apple.com/documentation/quartz/ikpicturetaker
| 归档时间: |
|
| 查看次数: |
2635 次 |
| 最近记录: |