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;