Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef void (^RetryAPICall)(BOOL isRetry);
- - (RetryAPICall) makeRecursiveBlock
- {
- RetryAPICall aBlock;
- __block __unsafe_unretained RetryAPICall aBlock_recursive;
- aBlock_recursive = aBlock = [^(BOOL isRetry)
- {
- [AFHTTPClient postPath:path
- parameters:params
- success:^(AFHTTPRequestOperationSKZ *operation, id responseObject) {
- //Execute success flow here
- }
- failure:^(AFHTTPRequestOperationSKZ *operation, NSError *error) {
- aBlockRecursive(YES); //This throws a bad access exception
- }];
- } copy];
- return aBlock;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement