Created
June 1, 2012 08:35
-
-
Save sendoa/2850375 to your computer and use it in GitHub Desktop.
Categoría para UIImageView con bordes redondeados
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
// | |
// UIImageRounded.h | |
// BDD Restaurantes | |
// | |
// Created by Sendoa Portuondo on 03/10/11. | |
// Copyright 2011 Qbikode Solutions, S.L. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIImageView (rounded) | |
- (void)setImage:(UIImage *)image conRadioBorde:(CGFloat)radio; | |
@end |
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
// | |
// UIImageRounded.m | |
// BDD Restaurantes | |
// | |
// Created by Sendoa Portuondo on 03/10/11. | |
// Copyright 2011 Qbikode Solutions, S.L. All rights reserved. | |
// | |
#import "UIImageViewRounded.h" | |
#import "QuartzCore/QuartzCore.h" | |
@implementation UIImageView (rounded) | |
- (void)setImage:(UIImage *)image conRadioBorde:(CGFloat)radio | |
{ | |
[self setImage:image]; | |
[[self layer] setCornerRadius:radio]; | |
[[self layer] setMasksToBounds:YES]; | |
[[self layer] setBorderColor:[UIColor blackColor].CGColor]; | |
[[self layer] setBorderWidth:0]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment