Bearbeiten

Freigeben über


UIView.SetContentCompressionResistancePriority Method

Definition

Sets the resistance to compression below the UIView's IntrinsicContentSize.

[Foundation.Export("setContentCompressionResistancePriority:forAxis:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetContentCompressionResistancePriority (float priority, UIKit.UILayoutConstraintAxis axis);
abstract member SetContentCompressionResistancePriority : single * UIKit.UILayoutConstraintAxis -> unit
override this.SetContentCompressionResistancePriority : 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 compression to a size smaller than its IntrinsicContentSize. Application developers should set this property for both Horizontal and Vertical.

Applies to

See also

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