获取 RKRequest/RKRequestQueue 上的数据大小?
我正在使用 RestKit,它非常棒。 我有几个 RKRequest 聚集在一个 RKRequestQueue 中,我希望向用户显示下载进度。 我找不到获取或生成请求的数据大小的方法。
我将不胜感激任何帮助。
谢谢 沙尼
I am using RestKit and it is great.
I have few RKRequests gathered in one RKRequestQueue, and i wish to show the users the download progress.
I can not find a away to get or generate the data size of the requests.
I will appreciate any help.
Thanks
Shani
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最近 RKRequest 的委托有一个新方法称为
request:didReceivedData:totalBytesReceived:totalBytesExpectedToReceive:
您可以实现此方法来显示下载进度。
在这里查看文档:
RKRequestDelegate 文档...
(文档中方法名称有拼写错误 - 我没有检查源代码中是否正确)
Recently RKRequest's delegate has new method called
request:didReceivedData:totalBytesReceived:totalBytesExpectedToReceive:
You can implement this method to display download progress.
Checkout docs here:
RKRequestDelegate docs...
(documentation has typo in method name - I didn't check if it's correct in source code)