Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created July 22, 2013 02:59
Show Gist options
  • Save jontelang/6051051 to your computer and use it in GitHub Desktop.
Save jontelang/6051051 to your computer and use it in GitHub Desktop.
asd
UIImage* i = _UICreateScreenUIImage();
UIImageView* bg = [[UIImageView alloc] initWithImage:i];
static NSArray *filters;
if (!filters) {
CAFilter *filter = [CAFilter filterWithType:@"gaussianBlur"];
[filter setValue:[NSNumber numberWithFloat:10] forKey:@"inputRadius"];
[filter setValue:[NSNumber numberWithBool:YES] forKey:@"inputHardEdges"];
filters = [[NSArray alloc] initWithObjects:filter, nil];
}
CALayer *layer = bg.layer;
layer.filters = filters;
layer.shouldRasterize = YES;
[i release];
[ilw setBackgroundImage:bg];
[bg release];
-(void)setBackgroundImage:(UIView*)_backgroundView
{
[backgroundView removeFromSuperview];
backgroundView = [_backgroundView retain];
backgroundView.layer.borderWidth = 3;
backgroundView.layer.borderColor = [UIColor greenColor].CGColor;
//[backgroundView setFrame:CGRectMake(0,100,100,100)];
backgroundView.transform = CGAffineTransformMakeTranslation(0, -20);
[self insertSubview:backgroundView atIndex:0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment