Skip to content

Instantly share code, notes, and snippets.

@pentiumao
Created January 3, 2014 03:55
Show Gist options
  • Save pentiumao/8232411 to your computer and use it in GitHub Desktop.
Save pentiumao/8232411 to your computer and use it in GitHub Desktop.
UIlabel with icon around it
- (void)addImage:(UIImage *)image atPoint:(CGPoint)p;
{
float width = image.size.width;
float height = image.size.height;
UIImageView *icon = [[UIImageView alloc] initWithImage:image];
icon.frame = CGRectMake(p.x, p.y, width, height);
[self addSubview:icon];
self.layer.masksToBounds = NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment