Skip to content

Instantly share code, notes, and snippets.

@sendoa
Created June 1, 2012 08:35
Show Gist options
  • Save sendoa/2850375 to your computer and use it in GitHub Desktop.
Save sendoa/2850375 to your computer and use it in GitHub Desktop.
Categoría para UIImageView con bordes redondeados
//
// 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
//
// 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