我熟悉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.
更多推荐
发布评论