Edit

Share via


UIView.SetContentHuggingPriority(Single, UILayoutConstraintAxis) Method

Definition

Sets the resistance to expansion beyond the UIView's IntrinsicContentSize.

[Foundation.Export("setContentHuggingPriority:forAxis:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetContentHuggingPriority (float priority, UIKit.UILayoutConstraintAxis axis);
abstract member SetContentHuggingPriority : single * UIKit.UILayoutConstraintAxis -> unit
override this.SetContentHuggingPriority : single * UIKit.UILayoutConstraintAxis -> unit

Parameters

priority
Single

The new priority. Preferable if a member of UILayoutPriority.

axis
UILayoutConstraintAxis

The axis for which the resistance is being set.

Attributes

Remarks

This method sets the resistance of a UIView to expansion to a size greater than its IntrinsicContentSize. Application developers should set this property for both Horizontal and Vertical.

Applies to

See also

  • <xref:UIKit.UIView.SetContentCompressionResistancePriority>