Edytuj

Udostępnij za pośrednictwem


UIView.SystemLayoutSizeFittingSize Method

Definition

Overloads

SystemLayoutSizeFittingSize(CGSize)

Calculates the smallest or largest size that this UIView can have that satisfies its Auto Layout constraints.

SystemLayoutSizeFittingSize(CGSize, Single, Single)

Returns the optimal size for this, based on constraints, and the fitting priority arguments.

SystemLayoutSizeFittingSize(CGSize)

Calculates the smallest or largest size that this UIView can have that satisfies its Auto Layout constraints.

[Foundation.Export("systemLayoutSizeFittingSize:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual CoreGraphics.CGSize SystemLayoutSizeFittingSize (CoreGraphics.CGSize size);
abstract member SystemLayoutSizeFittingSize : CoreGraphics.CGSize -> CoreGraphics.CGSize
override this.SystemLayoutSizeFittingSize : CoreGraphics.CGSize -> CoreGraphics.CGSize

Parameters

size
CGSize

This parameter should be UILayoutFittingCompressedSize to retrieve the smallest possible size or UILayoutFittingExpandedSize to retrieve the largest possible size

Returns

Returns the smallest (if size == UILayoutFittingCompressedSize) or largest (if size == UILayoutFittingExpandedSize)SizeF that satisfies the constraints that relate to this UIView.

Attributes

Remarks

This method can calculate either the largest or the smallest size consistent with the Auto Layout constraints of this UIView and the constraints of its Subviews. This method may only be called with size equal to one of the predefined SizeFs UILayoutFittingCompressedSize or UILayoutFittingExpandedSize.

Applies to

SystemLayoutSizeFittingSize(CGSize, Single, Single)

Returns the optimal size for this, based on constraints, and the fitting priority arguments.

[Foundation.Export("systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual CoreGraphics.CGSize SystemLayoutSizeFittingSize (CoreGraphics.CGSize targetSize, float horizontalFittingPriority, float verticalFittingPriority);
abstract member SystemLayoutSizeFittingSize : CoreGraphics.CGSize * single * single -> CoreGraphics.CGSize
override this.SystemLayoutSizeFittingSize : CoreGraphics.CGSize * single * single -> CoreGraphics.CGSize

Parameters

horizontalFittingPriority
Single
verticalFittingPriority
Single

Returns

Attributes

Applies to