UIImageView

clipToBounds UIImage *image = [UIImage imageNamed:@"image.png"]; UIImageView *imageView = [ [ UIImageView alloc ] initWithFrame:CGRectMake(0.0, 0.0, image.size.width, image.size.height) ]; imageView.image = image; [self addSubview:imageView]; CGAffineTransform rotate = CGAffineTransformMakeRotation( 1.0 / 180.0 * 3.14 ); [imageView setTransform:rotate]; cell.imageView.layer.masksToBounds = YES; cell.imageView.layer.cornerRadius = 5.0; ... @interface UIImage (TPAdditions) - (UIImage*)imageScaledToSize:(CGSize)size; @end @implementation UIImage (TPAdditions) - (UIImage*)imageScaledToSize:(CGSize)size { UIGraphicsBeginImageContext(size); [self drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext; UIGraphicsEndImageContext; return image; } @end ... UIImage *image = account.image; if ( image ) { cell.image = [image imageScaledToSize:CGSizeMake(38, 38)]; }
 * http://stackoverflow.com/questions/2281939/uiimageview-in-uiview-and-not-to-display-image-parts-out-of-bounds
 * http://www.chuckstar.com/blog/technology/iphone-sample-rotating-uiimage-inside-uiimageview/
 * http://atastypixel.com/blog/easy-rounded-corners-on-uitableviewcell-image-view/

UIImageView * roundedView = ; // Get the Layer of any view CALayer * l = [roundedView layer]; [l setMasksToBounds:YES]; [l setCornerRadius:10.0];
 * http://stackoverflow.com/questions/2171506/add-rounded-corners-to-uiimageview