Düzenle

Aracılığıyla paylaş


UIView.ClipsToBounds Property

Definition

Specifies whether the Subviews are confined to the Bounds of the receiver.

public virtual bool ClipsToBounds { [Foundation.Export("clipsToBounds")] get; [Foundation.Export("setClipsToBounds:")] set; }
member this.ClipsToBounds : bool with get, set

Property Value

The default value is false.

Attributes

Remarks

If this property is false, subviews whose Frame extends beyond their Superview's Bounds will be fully displayed. If this property is true, only that portion that lies within their Superview's Bounds will be displayed.

In the following image, the green rectangles are subviews of the blue rectangles (var innerView = new UIView(new RectangleF(-10, 10, 175, 25));). The top blue rectangle has its ClipsToBounds left at the default false value while the lower rectangle shows the clipping that occurs when ClipsToBounds is set to true.

Applies to