#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 |