菜鸟教程小白 发表于 2022-12-13 06:21:44

ios - 如何在ios中选择多选图像


                                            <p><p>我正在为 iPhone 制作一个应用程序,并希望让用户能够从他们的照片库中多选图像。我已经有一个工作代码供用户一次选择四个图像。但我不能一次选择 2 或 3 个图像。我想一次选择 2 或 3 个图像。我正在尝试以下代码。请帮助我任何人。 </p>

<pre><code>- (id)initImagePicker
{   
    ELCAlbumPickerController *albumPicker = [ initWithStyle:UITableViewStylePlain];   
    self = ;
    if (self)
    {         
      self.maximumImagesCount = 4;
      ;
    }   
    else if (self)   
    {         
      self.minimumImageCount=1;      
      ;
    }      
    return self;
}

- (id)initWithRootViewController:(UIViewController *)rootViewController
{
    self = ;
    if (self)
      self.maximumImagesCount = 4;      
    else if (self)
      self.minimumImageCount=1;   
    return self;
}

-(void)choosePhotoFromExistingImages
{
    ELCImagePickerController *elcPicker = [ initImagePicker];
    elcPicker.maximumImagesCount = 4;
    elcPicker.returnsOriginalImage = NO; //Only return the fullScreenImage, not the fullResolutionImage
    elcPicker.imagePickerDelegate = self;
    ;
}
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>你应该试试<a href="https://github.com/mwaterfall/MWPhotoBrowser" rel="noreferrer noopener nofollow">MWPhotoBrowser Control by Michael Waterfall</a>
<br/>
他提供了单张和多张照片选择</p>

<p><br/>适用于 iOS 5.1.1+。
<br/>所有字符串都是可本地化的,因此可以在支持多种语言的应用中使用。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在ios中选择多选图像,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/21670656/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/21670656/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在ios中选择多选图像