[imageView.layer setMasksToBounds:YES];//thys make all layer with the rounded corner.
[imageView.layer setCornerRadius:10.0];
setMasksToBounds:方法告诉layer将位于它之下的layer都遮盖住,这样会使圆角不被遮住。
转载于:https://www.cnblogs.com/liuxingzi/archive/2013/05/06/3404344.html