UIKit.UIView.SizeToFit Method
Moves and resizes the UIKit.UIView so that it tightly encloses its UIView.Subviews

Syntax

[Foundation.Export("sizeToFit")]
public virtual void SizeToFit ()

See Also

UIView.SizeThatFits

Remarks

Calling this method resizes the UIKit.UIView so that it just encloses its subviews. Some UIKit.UIView that do not have their UIView.Superview property set resize themselves to the screen bounds, so application developers should generally make sure that they have assembled an appropriate view hierarchy before calling UIView.SizeToFit.

Application developers should not override this method. Instead, application developers should override UIView.SizeThatFits, which this method will call.

Requirements

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