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

Syntax

[Foundation.Export("systemLayoutSizeFittingSize:")]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_6_0)]
public virtual CoreGraphics.CGSize SystemLayoutSizeFittingSize (CoreGraphics.CGSize size)

Parameters

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

Returns

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

Remarks

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

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0