블럭코드 변수 사용 예제.
@implementation UIImageView (AFNetworkingCustom) - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage gaussianBlur:(BOOL)filter { NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; if(filter){ //가우시안필터 void (^block) (NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) = ^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image){ [self setImage:[image imageWithGaussianBlur]]; }; [self setImageWithURLRequest:request placeholderImage:placeholderImage success:block failure:nil]; }else{ [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; } } @end