title: iOS method reuse (pass parameters)
body: <p>I have an url request method, because each page will be used, I want to make it public.
  （Poor standard of English, forgive me）
  here is my class method:</p>
  
  <pre><code>- (void)httpRequest :(NSString *)url :(NSMutableArray *)array;
  
  {
  
      NSURL *myUrl = [NSURL URLWithString:url];
  
      NSURLRequest *request = [[NSURLRequest alloc] initWithURL:myUrl cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10];
  
      AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
  
      [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject)
  
       {
  
           NSLog(@"请求完成");
  
           NSArray *arr;
  
           arr = [NSJSerialization JSONObjectWithData:operation.responseData options:NSJSONReadingAllowFragments error:NULL];
  
           [array addObjectsFromArray:arr];
  
              ？？？？？？？
  
       }failure:^(AFHTTPRequestOperation *operation, NSError *error){
  
           NSLog(@"请求失败: %@", error);
              ？？？？？？
       }];
      [operation start];
  }
  </code></pre>
  
  <p>I know how to pass simple parameters,like array and url.But when I use this method,code in the question mark will be different everytime.What can I do to make it can be passed,like parameters.</p>
  
  <p>Like: <code>[myApple httpRequest :myurl :myarray :  (susucess .....)    :  (failure......)];</code>
  the question mark can be filled in:  mytableView reloadData  or    nslog...<br>
  I'm not sure if i explained my question clearly,i don't know if block can solve this,thanks,waiting for your help.</p>