ImageView的圆角半径

1 // 设置imageview的圆角半径
2  UIImageView *imageView = (UIImageView *)[cell viewWithTag:tag];
3  imageView.layer.cornerRadius = 10;
4  imageView.layer.masksToBounds = YES;
5  // 图片居中,而且限制在ImageView的bounds中
6 imageView.contentMode = UIViewContentModeScaleAspectFit;
7 // 接收触模事件
8 imageView.userInteractionEnabled = YES;

 

 
 
posted @ 2013-08-03 13:59  wangzhenxiang  阅读(237)  评论(0编辑  收藏  举报