Instance Property

allowsGroupOpacity

A Boolean indicating whether the layer is allowed to composite itself as a group separate from its parent.

Declaration

@property BOOL allowsGroupOpacity;

Discussion

When the value is YES and the layer’s opacity property value is less than 1.0, the layer is allowed to composite itself as a group separate from its parent. This gives correct results when the layer contains multiple opaque components, but may reduce performance.

The default value is read from the boolean UIViewGroupOpacity property in the main bundle’s Info.plist file. If no value is found, the default value is YES for apps linked against the iOS 7 SDK or later and NO for apps linked against an earlier SDK.

See Also

Modifying the Layer’s Appearance

contentsGravity

A constant that specifies how the layer's contents are positioned or scaled within its bounds.

Contents Gravity Values

The contents gravity constants specify the position of the content object when the layer bounds is larger than the bounds of the content object. They are used by the contentsGravity property.

opacity

The opacity of the receiver. Animatable.

hidden

A Boolean indicating whether the layer is displayed. Animatable.

masksToBounds

A Boolean indicating whether sublayers are clipped to the layer’s bounds. Animatable.

mask

An optional layer whose alpha channel is used to mask the layer’s content.

doubleSided

A Boolean indicating whether the layer displays its content when facing away from the viewer. Animatable.

cornerRadius

The radius to use when drawing rounded corners for the layer’s background. Animatable.

borderWidth

The width of the layer’s border. Animatable.

borderColor

The color of the layer’s border. Animatable.

backgroundColor

The background color of the receiver. Animatable.

shadowOpacity

The opacity of the layer’s shadow. Animatable.

shadowRadius

The blur radius (in points) used to render the layer’s shadow. Animatable.

shadowOffset

The offset (in points) of the layer’s shadow. Animatable.

shadowColor

The color of the layer’s shadow. Animatable.

shadowPath

The shape of the layer’s shadow. Animatable.

style

An optional dictionary used to store property values that aren't explicitly defined by the layer.

allowsEdgeAntialiasing

A Boolean indicating whether the layer is allowed to perform edge antialiasing.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software