Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 ios 中制作完整的圆形imageview以显示任何用户的个人资料照片。
imageview
是否有可能与layer.cornerRadius财产或需要找到其他解决方案?
layer.cornerRadius
任何帮助将不胜感激。
是的,您可以使用layer.cornerRadius,只是不要忘记添加layer.masksToBounds = YES;
layer.masksToBounds = YES;
使用 QuartzCore 是最适合您的解决方案,请参阅此答案,它会对您有所帮助。
注意:适用于的UIView将适用于UIImageView。
UIView
UIImageView