如何取消或暂停MKNetworkKit iOS的下载操作? [英] How to cancel or pause download operation of MKNetworkKit iOS?
问题描述
我的计划是从网站下载文件。
我正在使用MKNetworkKit并学习一下并进行测试。
我可以从网络下载文件,但我无法暂停或取消下载。
我查看了代码,但我不知道如何在下载过程中取消操作。
我想做的是创建一个取消按钮,当我点击它,它将触发IBAction取消下载过程。
另一步是暂停下载。
您不能暂停请求。然而,您可以取消它,如果您的服务器支持Range标头,MKNetworkKit将自动恢复您的下载。
I am very new to iOS Programming and have been learning for only a month or two. My plan is to download files from websites. I am using MKNetworkKit and learning a little bit and testing it. I can download the file from the web but I cannot pause or cancel the download. I looked through the code but I don't know how to cancel the operation in the middle of the download. What I want to do is create a cancel button and when I hit it, it will trigger IBAction to cancel the download process. Another step is pause the download.
You cannot pause a request. You can however cancel it and if your server supports Range headers, MKNetworkKit automatically resumes your download.
这篇关于如何取消或暂停MKNetworkKit iOS的下载操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!