【发布时间】:2019-07-22 20:35:57
【问题描述】:
我已经在 Android 中完成了此操作,但似乎无法找到有关在 iOS 中执行此操作的任何信息。基本上:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/JPEG");
Intent i = Intent.createChooser(intent, "File");
startActivityForResult(i, CHOOSE_FILE_REQUESTCODE);
然后
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// Check which request we're responding to
if (requestCode == CHOOSE_FILE_REQUESTCODE) {
// Make sure the request was successful
if (resultCode == RESULT_OK) {
// The user picked a contact.
// The Intent's data Uri identifies which contact was selected.
// Do something with the contact here (bigger example below)
}
}
}
对应的术语和示例代码是什么/在哪里?
(感谢 Objective-C 示例)
【问题讨论】:
标签: ios objective-c xcode