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

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -