<GCKRequestDelegate> 协议
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承 <NSObjectNSObject>。
- (void) requestDidComplete: |
|
(GCKRequest *) |
request |
|
|
optional |
在请求失败时调用。
- Parameters
-
request | The request. |
error | The error describing the failure. |
- (void) request: |
|
(GCKRequest *) |
request |
didAbortWithReason: |
|
(GCKRequestAbortReason) |
abortReason |
|
|
| |
|
optional |
在不再跟踪请求时调用。
它无法保证请求成功或失败。
- Parameters
-
request | The request. |
abortReason | The reason why the request is no longer being tracked. |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["\u003cp\u003eThe \u003ccode\u003eGCKRequestDelegate\u003c/code\u003e protocol defines methods to handle the lifecycle of a \u003ccode\u003eGCKRequest\u003c/code\u003e, providing callbacks for success, failure, and abortion.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erequestDidComplete:\u003c/code\u003e is called when a request successfully completes.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erequest:didFailWithError:\u003c/code\u003e is called when a request fails, providing an error object with details about the failure.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erequest:didAbortWithReason:\u003c/code\u003e is called when a request is no longer tracked, indicating it may not have completed or failed, with a reason for the abortion.\u003c/p\u003e\n"]]],[],null,["# <GCKRequestDelegate> Protocol\n\n[Instance Methods](#pub-methods) \n\\\u003cGCKRequestDelegate\\\u003e Protocol Reference \n\nOverview\n--------\n\nThe [GCKRequest](/cast/v3/reference/ios/interface_g_c_k_request \"An object for tracking an asynchronous request. \") delegate protocol.\n\nSince\n: 3.0\n\nInherits \\\u003cNSObjectNSObject\\\u003e.\n\n|--------|-----------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (void) | - [requestDidComplete:](/cast/v3/reference/ios/protocol_g_c_k_request_delegate-p#a9c6e7715c587fdd087739d610bf8ce71) |\n| | Called when the request has successfully completed. [More...](#a9c6e7715c587fdd087739d610bf8ce71) |\n| ||\n| (void) | - [request:didFailWithError:](/cast/v3/reference/ios/protocol_g_c_k_request_delegate-p#a1b698b8223fd7101ca187309f755cf7b) |\n| | Called when the request has failed. [More...](#a1b698b8223fd7101ca187309f755cf7b) |\n| ||\n| (void) | - [request:didAbortWithReason:](/cast/v3/reference/ios/protocol_g_c_k_request_delegate-p#a97196a5186c90fb0f825c3afbfbf663b) |\n| | Called when the request is no longer being tracked. [More...](#a97196a5186c90fb0f825c3afbfbf663b) |\n| ||\n\nMethod Detail\n-------------\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |------------------------------|---|-------------------------------------------------------------------|-----------|---| | - (void) requestDidComplete: | | ([GCKRequest](/cast/v3/reference/ios/interface_g_c_k_request) \\*) | *request* | | | optional |\n\nCalled when the request has successfully completed.\n\nParameters\n:\n\n |---------|--------------|\n | request | The request. |\n\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |-------------------|---|-------------------------------------------------------------------|-----------| | - (void) request: | | ([GCKRequest](/cast/v3/reference/ios/interface_g_c_k_request) \\*) | *request* | | didFailWithError: | | ([GCKError](/cast/v3/reference/ios/interface_g_c_k_error) \\*) | *error* | | | | | | | optional |\n\nCalled when the request has failed.\n\nParameters\n:\n\n |---------|-----------------------------------|\n | request | The request. |\n | error | The error describing the failure. |\n\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |---------------------|---|-------------------------------------------------------------------|---------------| | - (void) request: | | ([GCKRequest](/cast/v3/reference/ios/interface_g_c_k_request) \\*) | *request* | | didAbortWithReason: | | (GCKRequestAbortReason) | *abortReason* | | | | | | | optional |\n\nCalled when the request is no longer being tracked.\n\nIt does not guarantee that the request has succeed or failed.\n\nParameters\n:\n\n |-------------|--------------------------------------------------------|\n | request | The request. |\n | abortReason | The reason why the request is no longer being tracked. |"]]