iOS开发学习-给圆形图片添加边框

        imageView.layer.cornerRadius = imageView.bounds.size.width * 0.5;// 设置圆角刚好是自身宽度的一半,就刚好是圆形

        imageView.layer.masksToBounds = YES;

        imageView.layer.borderWidth = 1; //边框宽度

        imageView.layer.borderColor = [[UIColor grayColor] CGColor];//边框颜色

posted @ 2016-06-29 11:57  Gjianhao  阅读(351)  评论(0编辑  收藏  举报