iphone - 如何处理来自 UIImagePickerController 的多个图像?
<p><p>我对 XCode 比较陌生,我不明白如何允许用户从 UIImagePickerControler 中选择多个图像。这是我当前允许用户选择一张图片的代码:</p>
<pre><code>UIImagePickerController *imagePicker = [ init];
imagePicker.delegate = self;
;
;
</code></pre>
<p>然后,为了处理选择的图像,我使用:</p>
<pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
;
UIImage *image = ;
//do stuff with image
}
</code></pre>
<p>如何修改代码的两个部分以允许用户选择多个图像。提前致谢。</p>
<p>古维</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>查看 <a href="http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009722" rel="noreferrer noopener nofollow">Asset Library APIs</a> .他们让你做 ImagePicker 在内部做的事情。然后,您可以在此基础上添加您自己的逻辑(即多选)。
<a href="http://www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/" rel="noreferrer noopener nofollow">Here's a nice tutorial for that.</a> </p></p>
<p style="font-size: 20px;">关于iphone - 如何处理来自 UIImagePickerController 的多个图像?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/7867872/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/7867872/
</a>
</p>
页:
[1]