菜鸟教程小白 发表于 2022-12-12 13:19:10

ios - 如何访问下载的解压缩文件夹中的图像?


                                            <p><p>我是 iOS 新手,我有疑问,我正在将 iOS 中的资源(应用程序的附加图像)下载到文件夹</p>

<pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirPath = ;
NSString* strDestPath = ;
</code></pre>

<p>只有图像,我把它放在通过压缩 .zip 文件(同名)创建的文件夹中。
这个文件夹是否可以保存应用程序的资源,有什么方法可以让我将这个文件夹中的所有图像都视为我在构建之前添加到应用程序中的图像吗? (我必须创建表格,其中每一行都包含该解压缩文件夹中的一个图像)?
(当我在应用程序中已经有图像时,我知道要创建表格和单元格,这很令人困惑)。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><pre><code>NSData *imgData = ;
UIImage *thumbNail = [ initWithData:imgData];
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何访问下载的解压缩文件夹中的图像?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/27552343/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/27552343/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何访问下载的解压缩文件夹中的图像?