UIView cornerRadius

编程入门 行业动态 更新时间:2024-10-28 18:30:43
UIView cornerRadius - 什么?(UIView cornerRadius - of what?)

我熟悉UIView层的cornerRadius属性,使用QuartzCore框架公开。 当然,一般的经验法则是较大的值创建更圆的边缘,较小的值创建较少的圆边。 我很好奇,这个属性叫做cornerRadius ,我经常发现自己在问什么? 这个圆的半径我在变化的是什么和在哪里?

I am familiar with the cornerRadius property of UIView layers, exposed with the QuartzCore framework. The general rule of thumb, of course, is larger values create more rounded edges, and smaller values create less rounded edges. I'm curious though, the property is called cornerRadius, and I often find myself asking, radius of what? What and where is this circle whose radius I'm changing?

最满意答案

想象一下,在构成视图的矩形的每个角上都有一个圆圈。 角的圆角遵循圆弧。 cornerRadius是该圆的半径。

Imagine a circle at each corner of the rectangle framing the view. The rounded edge of the corner follows the arc of the circle. cornerRadius is the radius of that circle.

更多推荐

本文发布于:2023-07-26 02:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269981.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:UIView   cornerRadius

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!