//圆形图片
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 150.0, 150.0)];
//设置圆角
imageView.layer.cornerRadius = imageView.frame.size.height/2;
//设置遮罩
imageView.layer.masksToBounds = YES;
//设置内容填充模式
[imageView setContentMode:UIViewContentModeScaleAspectFill];
//设置超出部分剪切
[imageView setClipsToBounds:YES];
//设置阴影颜色
imageView.layer.shadowColor = [UIColor whiteColor].CGColor;
//设置阴影偏移
imageView.layer.shadowOffset = CGSizeMake(4.0, 4.0);
//设置阴影透明度
imageView.layer.shadowOpacity = 0.5;
//设置阴影角度
imageView.layer.shadowRadius = 2.0;
//设置边颜色
imageView.layer.borderColor = [UIColor whiteColor].CGColor;
//设置边的宽度
imageView.layer.borderWidth = 2.0f;
imageView.image = [UIImage imageNamed:@"profileIcon.jpg"];
[self.view addSubview:imageView];