SKProductsRequestDelegate失败
SKProductsRequestDelegate 只有一个方法:
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
通常,我发现这类委托将有多种方法来处理多种情况,而不仅仅是成功。例如:
-(void) connection:(NSURLConnection *)connection didFailWithError:(NSError *) error
我如何检查此代码是否由于某种原因失败,例如。用户离线?
SKProductsRequest *productsRequest = [[SKProductsRequest alloc] ... ];
productsRequest.delegate = self;
[productsRequest start];
The SKProductsRequestDelegate has one single method:
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
Usually, I find these sorts of delegates will have several methods for handling multiple cases, rather than just success. For example:
-(void) connection:(NSURLConnection *)connection didFailWithError:(NSError *) error
How can I check if this code fails for some reason, eg. the user is offline?
SKProductsRequest *productsRequest = [[SKProductsRequest alloc] ... ];
productsRequest.delegate = self;
[productsRequest start];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SKProductsRequestDelegate
符合SKRequestDelegate
协议。在那里你会发现
SKProductsRequestDelegate
conforms to theSKRequestDelegate
protocol.There you find