gpt4 book ai didi

ios - RestKit - RKRequestDelegate 不存在

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:31:15 25 4
gpt4 key购买 nike

我已经将 RestKit 安装到 Xcode 中并且构建良好。但是,我似乎在很多课上都不见了。我正在尝试将 RKRequestDelegate 类作为委托(delegate)添加到我的 View Controller 之一,但该委托(delegate)不存在。我也缺少 RKRequest 类。我查看了硬盘驱动器上的 RestKit 文件夹,但在那里看不到它们。也许我在这个过程中错过了一步。如果其他人遇到过这个问题,那么很高兴听到解决方案。

谢谢布莱恩

最佳答案

这是一个关于从 0.10.x 升级到 0.20.0 的 wiki:

https://github.com/RestKit/RestKit/wiki/Upgrading-from-v0.10.x-to-v0.20.0

如你所见,真的是一个很大的变化。对于 RKRequestDelegate,正如它所说:

The delegate protocols RKRequestDelegate and RKObjectLoaderDelegate have been removed from the project in favor of block based approaches. The most common, required methods of these protocols such as request:didLoadResponse:, request:didLoadError:, objectLoader:didLoadObjects:, and objectLoader:didLoadError: have been replaced with completion blocks on the AFHTTPRequestOperation and RKObjectRequestOperation classes. In general, these completion blocks are specified as a pair of success and failure blocks

看起来很棘手..

关于ios - RestKit - RKRequestDelegate 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14159851/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com