有没有一种方法可以告诉我的Restkit didFailWithError函数被调用的原因是什么时候缺少与服务器的连接?如何在didFailWithError中检测到由于没有连接而被调用?
-(void) objectLoader:(RKObjectLoader *)objectLoader didFailWithError:(NSError *)error{
//What should I do here to know the server could not be reached?
}
比你对我付出的答案,但我当记录error.code没有互联网连接控制台打印“2”...所以我想Restkit使用不同的代码... – Agustin