Düzenle

Aracılığıyla paylaş


UIView.TranslatesAutoresizingMaskIntoConstraints Property

Definition

Specifies whether the autoresizing mask should be translated into constraints for Auto Layout.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool TranslatesAutoresizingMaskIntoConstraints { [Foundation.Export("translatesAutoresizingMaskIntoConstraints")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] get; [Foundation.Export("setTranslatesAutoresizingMaskIntoConstraints:")] [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] set; }
member this.TranslatesAutoresizingMaskIntoConstraints : bool with get, set

Property Value

The default value is true.

Attributes

Remarks

If this property is true, this UIView's Superview will convert this UIView's AutoresizingMask into NSLayoutConstraints and include them in the Superview's Constraints. This will fully constrain this UIView and Auto Layout will not be able to resize or reposition this UIView.

If the application developer is using Auto Layout, setting this property to false allows Auto Layout to change the layout of this UIView.

In an over-constrained Auto Layout, the appearance of NSAutoresizingMaskLayoutConstraint in the Auto Layout debugging information is often an indication that the Application Developer has inappropriately left this property as true somewhere.

Applies to