Created
January 3, 2014 03:55
-
-
Save pentiumao/8232411 to your computer and use it in GitHub Desktop.
UIlabel with icon around it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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