Platforms to show: All Mac Windows Linux Cross-Platform

Back to CALayerMBS class.

CALayerMBS.affineTransform as CGAffineTransformMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The affine version of the layer's transform..

The affine transform structure that corresponds to the value in the layer's transform property.
(Read and Write property)

CALayerMBS.anchorPoint as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Defines the anchor point of the layer's bounds rectangle. Animatable.

You specify the value for this property using the unit coordinate space. The default value of this property is (0.5, 0.5), which represents the center of the layer's bounds rectangle. All geometric manipulations to the view occur about the specified point. For example, applying a rotation transform to a layer with the default anchor point causes the layer to rotate around its center. Changing the anchor point to a different location would cause the layer to rotate around that new point.

For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.
Available in OS X v10.5 and later.
(Read and Write property)

CALayerMBS.anchorPointZ as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The anchor point for the layer's position along the z axis. Animatable.

This property specifies the anchor point on the z axis around which geometric manipulations occur. The point is expressed as a distance (measured in points) along the z axis. The default value of this property is 0.
Available in OS X v10.6 and later.
(Read and Write property)

CALayerMBS.AutoresizingMask as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A bitmask defining how the layer is resized when the bounds of its superlayer changes.

If your app does not use a layout manager or constraints to handle layout changes, you can assign a value to this property to adjust the layer's size in response to changes in the superlayer's bounds. For a list of possible values, see "Autoresizing Mask".

The default value of this property is kCALayerNotSizable.
(Read and Write property)

CALayerMBS.backgroundColor as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The background color of the receiver. Animatable.

Value must be a CGColorMBS.
The default value of this property is nil.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.
(Read and Write property)

CALayerMBS.borderColor as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The color of the layer's border. Animatable.

Value must be a CGColorMBS.
The default value of this property is an opaque black color.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.
(Read and Write property)

CALayerMBS.borderWidth as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The width of the layer's border. Animatable.

When this value is greater than 0.0, the layer draws a border using the current borderColor value. The border is drawn inset from the receiver's bounds by the value specified in this property. It is composited above the receiver's contents and sublayers and includes the effects of the cornerRadius property.

The default value of this property is 0.0.
(Read and Write property)

CALayerMBS.bounds as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's bounds rectangle. Animatable.

The bounds rectangle is the origin and size of the layer in its own coordinate space. When you create a new standalone layer, the default value for this property is an empty rectangle, which you must change before using the layer. The values of each coordinate in the rectangle are measured in points.

For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.
(Read and Write property)

CALayerMBS.className as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The class name of the layer.

Useful for debugging.
(Read only property)

CALayerMBS.classPath as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The path of this layer class.

Useful for debugging to know what super classes the layer has.
(Read only property)

CALayerMBS.contents as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The contents of the layer.

Currently only CGImageMBS is allowed.
(Read and Write property)

CALayerMBS.contentsCenter as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The rectangle that defines how the layer contents are scaled during a resizing operation. Animatable.

You can use this property to subdivide the layer's content into a 3x3 grid. The value in this property specifies the location and size of the center rectangle in that grid. If the layer's contentsGravity property is set to one of the resizing modes, resizing the layer causes scaling to occur differently in each rectangle of the grid. The center rectangle is stretched in both dimensions, the top-center and bottom-center rectangles are stretched only horizontally, the left-center and right-center rectangles are stretched only vertically, and the four corner rectangles are not stretched at all. Therefore, you can use this technique to implement stretchable backgrounds or images using a three-part or nine-part image.

The value in this property is set to the unit rectangle (0.0,0.0) (1.0,1.0) by default, which causes the entire image to scale in both dimensions. If you specify a rectangle that extends outside the unit rectangle, the result is undefined. The rectangle you specify is applied only after the contentsRect property has been applied to the image.

Note: If the width or height of the rectangle in this property is very small or 0, the value is implicitly changed to the width or height of a single source pixel centered at the specified location.
(Read and Write property)

CALayerMBS.contentsRect as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The rectangle, in the unit coordinate space, that defines the portion of the layer's contents that should be used. Animatable.

Defaults to the unit rectangle (0.0, 0.0, 1.0, 1.0).
If pixels outside the unit rectangle are requested, the edge pixels of the contents image will be extended outwards.
If an empty rectangle is provided, the results are undefined.
(Read and Write property)

CALayerMBS.contentsScale as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The scale factor applied to the layer.

This value defines the mapping between the logical coordinate space of the layer (measured in points) and the physical coordinate space (measured in pixels). Higher scale factors indicate that each point in the layer is represented by more than one pixel at render time. For example, if the scale factor is 2.0 and the layer's bounds are 50 x 50 points, the size of the bitmap used to present the layer's content is 100 x 100 pixels.

The default value of this property is 1.0. For layers attached to a view, the view changes the scale factor automatically to a value that is appropriate for the current screen. For layers you create and manage yourself, you must set the value of this property yourself based on the resolution of the screen and the content you are providing. Core Animation uses the value you specify as a cue to determine how to render your content.

Available in OS X v10.7 and later.
(Read and Write property)

CALayerMBS.cornerRadius as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The radius to use when drawing rounded corners for the layer's background. Animatable.

Setting the radius to a value greater than 0.0 causes the layer to begin drawing rounded corners on its background. By default, the corner radius does not apply to the image in the layer's contents property; it applies only to the background color and border of the layer. However, setting the masksToBounds property to true causes the content to be clipped to the rounded corners.

The default value of this property is 0.0.
(Read and Write property)

CALayerMBS.DoubleSided as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean indicating whether the layer displays its content when facing away from the viewer. Animatable.

When the value in this property is false, the layer hides its content when it faces away from the viewer. The default value of this property is true.
Available in OS X v10.5 and later.
(Read and Write property)

CALayerMBS.drawsAsynchronously as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean indicating whether drawing commands are deferred and processed asynchronously in a background thread.

When this property is set to true, the graphics context used to draw the layer's contents queues drawing commands and executes them on a background thread rather than executing them synchronously. Performing these commands asynchronously can improve performance in some apps. However, you should always measure the actual performance benefits before enabling this capability.

The default value for this property is false.
Available in OS X v10.8 and later.
(Read and Write property)

CALayerMBS.frame as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's frame rectangle.

The frame rectangle is position and size of the layer specified in the superlayer's coordinate space. For layers, the frame rectangle is a computed property that is derived from the values in the bounds, anchorPoint and position properties. When you assign a new value to this property, the layer changes its position and bounds properties to match the rectangle you specified. The values of each coordinate in the rectangle are measured in points.

For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.

Note: The frame property is not directly animatable. Instead you should animate the appropriate combination of the bounds, anchorPoint and position properties to achieve the desired result.
(Read and Write property)

CALayerMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal reference to the layer.

(Read and Write property)

CALayerMBS.Hidden as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean indicating whether the layer is displayed. Animatable.

The default value of this property is false.
(Read and Write property)

CALayerMBS.mask as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer to be used as mask for this layer.

A layer whose alpha channel is used as a mask to select between the layer's background and the result of compositing the layer's contents with its filtered background. Defaults to nil. When used as a mask the layer's `compositingFilter' and `backgroundFilters' properties are ignored. When setting the mask to a new layer, the new layer must have a nil superlayer, otherwise the behavior is undefined. Nested masks (mask layers with their own masks) are unsupported.
(Read and Write property)

CALayerMBS.masksToBounds as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether to mask by bounds.

When true an implicit mask matching the layer bounds is applied to the layer (including the effects of the `cornerRadius' property). If both `mask' and `masksToBounds' are non-nil the two masks are multiplied to get the actual mask values. Defaults to false. Animatable.
(Read and Write property)

Some examples using this property:

CALayerMBS.minificationFilterBias as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The bias factor used by the minification filter to determine the levels of detail.

This value is used by the minificationFilter when it is set to kCAFilterTrilinear.
The default value of this property is 0.0.
Available in OS X v10.6 and later.
(Read and Write property)

CALayerMBS.modelLayer as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the model layer object associated with the receiver, if any.

Calling this method on a layer in the presentation tree returns the corresponding layer object in the model tree. This method returns a value only when a transaction involving changes to the presentation layer is in progress. If no transaction is in progress, the results of calling this method are undefined.

Available in OS X v10.5 and later.
(Read only property)

CALayerMBS.needsDisplay as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean indicating whether the layer has been marked as needing an update.

True if the layer needs to be updated.
Available in OS X v10.6 and later.
(Read only property)

CALayerMBS.needsDisplayOnBoundsChange as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean indicating whether the layer contents must be updated when its bounds rectangle changes.

When this property is set to true, the layer automatically calls its setNeedsDisplay method whenever its bounds property changes. The default value of this property is false.
(Read and Write property)

CALayerMBS.needsLayout as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean indicating whether the layer has been marked as needing a layout update.

True if the layer has been marked as requiring a layout update.
Available in OS X v10.6 and later.
(Read only property)

CALayerMBS.opacity as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The opacity of the receiver. Animatable.

The value of this property must be in the range 0.0 (transparent) to 1.0 (opaque). Values outside that range are clamped to the minimum or maximum. The default value of this property is 1.0.
(Read and Write property)

CALayerMBS.Opaque as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean value indicating whether the layer contains completely opaque content.

The default value of this property is false. If your app draws completely opaque content that fills the layer's bounds, setting this property to true lets the system optimize the rendering behavior for the layer. Specifically, when the layer creates the backing store for your drawing commands, Core Animation omits the alpha channel of that backing store. Doing so can improve the performance of compositing operations. If you set the value of this property to true, you must fill the layer's bounds with opaque content.

Setting this property affects only the backing store managed by Core Animation. If you assign an image with an alpha channel to the layer's contents property, that image retains its alpha channel regardless of the value of this property.
(Read and Write property)

CALayerMBS.position as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's position in its superlayer's coordinate space. Animatable.

The value of this property is specified in points and is always specified relative to the value in the anchorPoint property. For new standalone layers, the default position is set to (0.0, 0.0). Changing the frame property also updates the value in this property.

For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.
(Read and Write property)

CALayerMBS.preferredFrameSize as CGSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the preferred size of the layer in the coordinate space of its superlayer.

In OS X, the default implementation of this method calls the preferredSizeOfLayer method of its layout manager—that is, the object in its layoutManager property. If that object does not exist or does not implement that method, this method returns the size of the layer's current bounds rectangle mapped into the coordinate space of its superlayer.
(Read only property)

CALayerMBS.presentationLayer as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a copy of the presentation layer object that represents the state of the layer as it currently appears onscreen.

The layer object returned by this method provides a close approximation of the layer that is currently being displayed onscreen. While an animation is in progress, you can retrieve this object and use it to get the current values for those animations.

The sublayers, mask, and superlayer properties of the returned layer return the corresponding objects from the presentation tree (not the model tree). This pattern also applies to any read-only layer methods. For example, the hitTest: method of the returned object queries the layer objects in the presentation tree.

Available in OS X v10.5 and later.
(Read only property)

CALayerMBS.rasterizationScale as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The scale at which the layer will be rasterized.

(when the shouldRasterize property has been set to true) relative to the coordinate space of the layer. Defaults to one. Animatable.
(Read and Write property)

CALayerMBS.shadowColor as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The color of the layer’s shadow. Animatable.

The default value of this property is an opaque black color.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.

Value is a CGColorMBS object.
(Read and Write property)

CALayerMBS.shadowOffset as CGSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The offset (in points) of the layer’s shadow. Animatable.

The default value of this property is (0.0, -3.0).
(Read and Write property)

CALayerMBS.shadowOpacity as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The opacity of the layer's shadow. Animatable.

The value in this property must be in the range 0.0 (transparent) to 1.0 (opaque). The default value of this property is 0.0.
Available in OS X v10.5 and later.
(Read and Write property)

CALayerMBS.shadowPath as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The shadow path.

Value is a CGPathMBS object.

The default value of this property is nil, which causes the layer to use a standard shadow shape. If you specify a value for this property, the layer creates its shadow using the specified path instead of the layer’s composited alpha channel. The path you provide defines the outline of the shadow. It is filled using the non-zero winding rule and the current shadow color, opacity, and blur radius.

Unlike most animatable properties, this property (as with all CGPathRef animatable properties) does not support implicit animation. However, the path object may be animated using any of the concrete subclasses of CAPropertyAnimation. Paths will interpolate as a linear blend of the "on-line" points; "off-line" points may be interpolated non-linearly (to preserve continuity of the curve's derivative). If the two paths have a different number of control points or segments, the results are undefined. If the path extends outside the layer bounds it will not automatically be clipped to the layer, only if the normal layer masking rules cause that.

Specifying an explicit path usually improves rendering performance.

The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.
(Read and Write property)

CALayerMBS.shadowRadius as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The blur radius (in points) used to render the layer’s shadow. Animatable.

You specify the radius The default value of this property is 3.0.
(Read and Write property)

CALayerMBS.shouldRasterize as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether view should raster.

When true, the layer is rendered as a bitmap in its local coordinate space ("rasterized"), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer's filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the rendering engine may attempt to cache and reuse the bitmap from one frame to the next. (Whether it does or not will have no affect on the rendered output.) When false the layer is composited directly into the destination whenever possible (however, certain features of the compositing model may force rasterization, e.g. adding filters). Defaults to false. Animatable.
(Read and Write property)

Some examples using this property:

CALayerMBS.superlayer as CALayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The superlayer of the layer.

The superlayer manages the layout of its sublayers.
Available in OS X v10.5 and later.
(Read only property)

CALayerMBS.zPosition as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreAnimation MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The layer's position on the z axis. Animatable.

The default value of this property is 0. Changing the value of this property changes the the front-to-back ordering of layers onscreen. This can affect the visibility of layers whose frame rectangles overlap.

The value of this property is measured in points.
Available in OS X v10.5 and later.
(Read and Write property)

Some examples using this property:

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...