Contents

Develop
2013.10.01 14:37

[ios] GCD 변수 사용 예제

Views 12110 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

블럭코드 변수 사용 예제.


@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


?

  1. [c] 문자열 자르는 함수(strtok) 예제

  2. SVN 명령어 (SVN command)

  3. [mysql] DB->Text, Text->DB 변환

  4. [oracle] SQL문 실행 방법 3가지

  5. 참고하고 지울 자료.. 집에서 바야지.. ㅋㅋ

  6. [ios] GCD 변수 사용 예제

  7. [linux] 데스크탑환경(GNOME/KDE) 바꾸기..

  8. [ppt] Magic URLs & Hidden Form Fields 에 대해.. ㅋㅋ

  9. [linux] /etc/fstab 설정 방법.. ㅋㅋ

  10. [c++] 기초강좌 #03(함수의 매개변수 전달)

  11. [c++] 현승이가 준 P2P 프로그램 소스 ㅋㅋ

  12. [linux] 쉘 스크립트 (Shell Script)

Board Pagination Prev 1 ... 28 29 30 31 32 33 34 35 36 37 ... 98 Next
/ 98