当前位置: 动力学知识库 > 问答 > 编程问答 >

restkit - [RKClient sharedClient].requestQueue and [RKObjectManager sharedManager].requestQueue is the same queue?

问题描述:

[RKClient sharedClient].requestQueue and [RKObjectManager sharedManager].requestQueue are the same queue?

[[RKObjectManager sharedManager].requestQueue cancelRequestsWithDelegate:self];

[[RKClient sharedClient].requestQueue cancelRequestsWithDelegate:self];

I request by this

[[RKObjectManager sharedManager] loadObjectsAtResourcePath:final_url usingBlock:

^(RKObjectLoader *loader){...}];

I know it seems like I should use the first one, but would the second one did the same job?

网友答案:

These are not always the same thing. The FIRST RKObjectManager to be created becomes the sharedManager and the FIRST RKClient object becomes the sharedClient.

In a normal application (one manager created at the beginning of the app lifetime) these are the same object yes.

分享给朋友:
您可能感兴趣的文章:
随机阅读: