Bewerken

Delen via


UIView.ContentCompressionResistancePriority(UILayoutConstraintAxis) Method

Definition

Returns the resistance of an axis to compression below its intrinsic size.

[Foundation.Export("contentCompressionResistancePriorityForAxis:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual float ContentCompressionResistancePriority (UIKit.UILayoutConstraintAxis axis);
abstract member ContentCompressionResistancePriority : UIKit.UILayoutConstraintAxis -> single
override this.ContentCompressionResistancePriority : 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 compression below its intrinsic size.

Attributes

Remarks

Application developers should not override this method. Instead, they should manipulate the result by using SetContentCompressionResistancePriority(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.SetContentCompressionResistancePriority>
  • <xref:UIKit.UIView.ContentHuggingPriority>