ios - passing __block parameters to class method (for get request) -
i want create following class method: +(void) getvalue4key:(nsstring*)p_key andset:(id)p_variable { nsstring *baseurlstring = <<myurl>>; @try{ afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; [manager get:baseurlstring parameters:nil success:^(afhttprequestoperation *operation, id responseobject) { nsdictionary* element = responseobject[0]; element = [element objectforkey:@"fields"]; p_variable = [element objectforkey:@"value"]; } failure:^(afhttprequestoperation *operation, nserror *error) { nslog(@"getsystemvariablekey error: %@",error); }]; } @catch (nsexception *exception) { nslog(@"exception %@", exception); } } two questions: i following error: variable not assignable (missing __block type specifier) how can s...