FTP在iPhone下载非常慢 [英] FTP Downloading very slow in iPhone

查看:171
本文介绍了FTP在iPhone下载非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用FTPHelper.h和FTPHelper.m文件的应用程序。



我使用FTP从专用服务器上下载图像。



它在我的项目中正常工作,但从服务器下载的图像非常慢。



我有50张4.5mb的图片供下载,并且需要将近4到5分钟才能下载。

我在我的项目中导入了两个文件FTPHelper.h和FTPHelper.m,下面是我正在使用的代码。

   - (void)getdata 
{
[FTPHelper sharedInstance] .delegate = self;
[FTPHelper sharedInstance] .uname = BASE_USERNAME;
[FTPHelper sharedInstance] .pword = BASE_PASSWORD;
[FTPHelper sharedInstance] .urlString = BASE_URL;
[FTPHelper list:BASE_URL];
[FTPHelper下载:文件];
}

有没有其他办法可以缩短它的时间?



感谢...

使用 AsyncImageView

解决方案用于从网络下载后台图片。



查看来自 THIS LINK



以及从 AsyncImageView Link



另请参阅此链接中的一些不同代码 IOS-下载和保存图像-内部-应用


I am having an app in which I am using FTPHelper.h and FTPHelper.m files.

I am downloading the images from the dedicated server using FTP.

It works fine in my project but the images downloaded from server are very slow.

I have 50 images of 4.5mb to download and it takes almost 4 to 5 minutes to download.

I have imported two files FTPHelper.h and FTPHelper.m in my project and below is the code I am using.

-(void)getdata
{
    [FTPHelper sharedInstance].delegate = self;
    [FTPHelper sharedInstance].uname = BASE_USERNAME;
    [FTPHelper sharedInstance].pword = BASE_PASSWORD;
    [FTPHelper sharedInstance].urlString = BASE_URL;
   [FTPHelper list:BASE_URL];
    [FTPHelper download:file];
}

Is there any other way I can reduce the time for it?

Thanks...

解决方案

Use AsyncImageView for download that Images in background from web..

See Information about that from THIS LINK.

and Get Demo from AsyncImageView Link.

Also see some different code from this link ios-download-and-save-image-inside-app.

这篇关于FTP在iPhone下载非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆