ios - UIAlertView for when fetching JSON fails -
this question has answer here:
i'm trying uialertview run when fetching json data fails, can't seem work. i'd appreciate if show me how or point me in right direction!
i think have forget write failure block.
afhttprequestoperation *operation = [[afhttprequestoperation alloc]initwithrequest:request]; [operation setcompletionblockwithsuccess:^(afhttprequestoperation *operation, id responseobject) { nslog(@"success: %@", operation.responsestring); } failure:^(afhttprequestoperation *operation, nserror *error) { nslog(@"error: %@", operation.responsestring); }];
hope you.
Comments
Post a Comment