如题,正方形图片如何切成圆形?
有代码可以参考吗?
image.layer.cornerRadius = XX;
image.layer.masksToBounds = YES;
XX为你正方形imageView的宽
headIcon:loadTexture(tostring(headIconPath))
headIcon.layer.cornerRadius = 278
headIcon.layer.masksToBounds = YES
???这样会报错的,
278应该是你正方形的边长的一半
imageview有.layer这个变量吗?