更新时间:2023-02-02 17:36:44
您可以使用
As an alternative to Android's Path
, you can use either UIBezierPath or CGPath. The former is Objective-C, the later pure C. I recommend going with UIBezierPath as it's easier to use.
要旋转视图,请使用 transform 属性(请参见此问题有关如何使用它的示例)。但是请注意,然后您需要忽略框架
(未定义),并需要通过修改 center
。
To rotate a view, use the transform
property of UIView (see this question for an example on how to use it). But note that you then need to ignore the frame
(it's undefined) and need to move the view by modifying the center
instead.