В points
Apple упоминала об этом во многих местах автоматически сгенерированного модуля SwiftUI API: c, как на снимке ниже .frame
описания модификатора (см. эллипс будет 200x100 точек. ). Есть аналогичные для .offset
и .position
.
/// For example, the first ellipse in the following code is laid out in a
/// fixed 200 by 100 frame. Since a shape always occupies the space offered
/// to it, the first ellipse will be 200x100 points. The second ellipse is
/// laid out in a frame with only a fixed height, so it occupies that
/// height, and whatever width is offered to its parent.
///
/// VStack {
/// Ellipse()
/// .fill(Color.purple)
/// .frame(width: 200, height: 100),
/// Ellipse()
/// .fill(Color.blue)
/// .frame(height: 100)
/// }
На самом деле все, что связано с пространством координат, такое же, как в UIKit.