๐Ÿ“ฆAnchor<T>

  • Anchor<T> is an opaque type that holds a value of type T, and T can be either CGRect or CGPoint.

  • use Anchor<CGRect> to access the bounds of a view,

  • use Anchor<CGPoint> for other view properties such as top, topLeading, topTrailing, center, trailing, bottom, bottomLeading, bottomTrailing and leading.

้€™ๅ€‹็‰ฉไปถๅ…ถๅฏฆๆ˜ฏ็ตฆ GeometryProxy ็”จ็š„ใ€‚ ๐Ÿ‘‰ ่ฉณ่ฆ‹๏ผšAnchor Preferences

Last updated