Modifier

Partager via


UIView.ContentHuggingPriority(UILayoutConstraintAxis) Method

Definition

Returns the resistance of an axis to expansion larger than its intrinsic size.

[Foundation.Export("contentHuggingPriorityForAxis:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual float ContentHuggingPriority (UIKit.UILayoutConstraintAxis axis);
abstract member ContentHuggingPriority : UIKit.UILayoutConstraintAxis -> single
override this.ContentHuggingPriority : UIKit.UILayoutConstraintAxis -> single

Parameters

axis
UILayoutConstraintAxis

The axis whose resistance is being queried.

Returns

A UILayoutPriority that specifies how resistant the view is along the axis to expansion beyond its intrinsic size.

Attributes

Remarks

Application developers should not override this method. Instead, they should manipulate the result by using SetContentHuggingPriority(Single, UILayoutConstraintAxis).

ContentCompressionResistancePriority(UILayoutConstraintAxis) and ContentHuggingPriority(UILayoutConstraintAxis) are complementary: ContentCompressionResistancePriority(UILayoutConstraintAxis) is the resistance to shrinking of the content and ContentHuggingPriority(UILayoutConstraintAxis) is the resistance to growing.

Applies to

See also

  • <xref:UIKit.UIView.SetContentHuggingPriority>
  • <xref:UIKit.UIView.ContentCompressionResistancePriority>