zombie45
zombie's dev story
zombie45

공지사항

  • 분류 전체보기
    • iPhone
    • Study

인기 글

최근 댓글

최근 글

티스토리

반응형

블로그 메뉴

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록
  • 글쓰기
전체 방문자
오늘
어제

태그

  • textformfield
  • Flutter
  • Box2d cocos2dx cocos2d-x
  • cocoapods-binary-cache
  • FocusScope
  • CI/CD
  • 큰폴더
  • TextInputAction
  • caching
  • 안드로이드
  • Animtaion
  • flutter l10n helper
  • 자동배포
  • Nodejs node express expressjs
  • cache
  • UIViewController
  • intl
  • android_key_hash
  • l10nization
  • actions
  • flutter_localizations
  • code spell checker
  • jks
  • 카카오 로그인
  • 오블완
  • cspell
  • 티스토리챌린지
  • nextFocus
  • 큰파일
  • appDelegate
hELLO · Designed By 정상우.
zombie45

zombie's dev story

Study

블러와 그라디언트

2013. 9. 8. 20:19
#import <QuartzCore/QuartzCore.h>

...
CAGradientLayer *l = [CAGradientLayer layer];
l.frame = view.bounds;
l.colors = [NSArray arrayWithObjects:(id)[UIColor whiteColor].CGColor, (id)[UIColor clearColor].CGColor, nil];
l.startPoint = CGPointMake(0.5f, 0.0f);
l.endPoint = CGPointMake(0.5f, 1.0f);
v.layer.mask = l;

#import <QuartzCore/QuartzCore.h>

@interface CAFilter : NSObject

+ (id)filterWithName:(NSString*)str;

@end


CAFilter* filter = [CAFilter filterWithName:@"gaussianBlur"];

[filter setValue:[NSNumber numberWithFloat:5] forKey:@"inputRadius"];

self.window.rootViewController.view.layer.filters = [NSArray arrayWithObject:filter];

UIView *whiteView = [[UIView alloc] initWithFrame:CGRectMake(50, 50, 200, 55)];

[whiteView setBackgroundColor:[UIColor whiteColor]];

[self.window addSubview:whiteView];


1)그라디언트 처리

2)블러처리

반응형

'Study' 카테고리의 다른 글

멀티 로칼 서버  (0) 2013.09.20
php 실시간 새로고침  (0) 2013.09.20
Sublime Text2-move to end of line using ctrl+e:  (0) 2013.03.12
jsonkit  (0) 2013.02.06
Cocos3d Installation and CC3DemoMashup in xcode4.5  (0) 2013.01.18
    'Study' 카테고리의 다른 글
    • 멀티 로칼 서버
    • php 실시간 새로고침
    • Sublime Text2-move to end of line using ctrl+e:
    • jsonkit
    zombie45
    zombie45
    잡다한 개발

    티스토리툴바