CAGradientLayer Class

Definition

Layer that renders a gradient over its background.

[Foundation.Register("CAGradientLayer", true)]
public class CAGradientLayer : CoreAnimation.CALayer
type CAGradientLayer = class
    inherit CALayer
Inheritance
CAGradientLayer
Attributes

Remarks

When you want to use one of the CALayer subclasses as your UIView's backing layer, you need to add the following code snippet to your class:


class MyView : UIView {
    //
    // This instructs the runtime that whenever a MyView is created
    // that it should instantiate a CAGradientLayer and assign that to the
    // UIView.Layer property
    //
    [Export ("layerClass")]
    public static Class LayerClass () {
        return new Class (typeof (CAGradientLayer));
    }
}

Constructors

CAGradientLayer()

Default constructor that initializes a new instance of this class with no parameters.

CAGradientLayer(IntPtr)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

CAGradientLayer(NSCoder)

A constructor that initializes the object from the data stored in the unarchiver object.

CAGradientLayer(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

Properties

Actions

NSDictionary containing the layer's actions.

(Inherited from CALayer)
AffineTransform

The affine version of the layer's Transform.

(Inherited from CALayer)
AllowsEdgeAntialiasing

Whether edge antialiasing is allowed.

(Inherited from CALayer)
AllowsGroupOpacity

Whether group opacity is allowed.

(Inherited from CALayer)
AnchorPoint

The anchor point for the Bounds rectangle.

(Inherited from CALayer)
AnchorPointZ

The anchor point for the Bounds, defined along the Z axis.

(Inherited from CALayer)
AnimationKeys

Identifiers for the animations associated with this layer.

(Inherited from CALayer)
AutoresizingMask (Inherited from CALayer)
AutoresizinMask (Inherited from CALayer)
AutoReverses (Inherited from CALayer)
BackgroundColor

The background color of the layer.

(Inherited from CALayer)
BackgroundFilters

An array of Core Image filters that are applied to the content behind this layer.

(Inherited from CALayer)
BeginTime (Inherited from CALayer)
BorderColor

The color of the border of the layer.

(Inherited from CALayer)
BorderWidth

The width of the border of the layer.

(Inherited from CALayer)
Bounds (Inherited from CALayer)
Class (Inherited from NSObject)
ClassHandle

The handle for this class.

Colors

An array of colors defining the gradient. These values can be animated.

CompositingFilter

A Core Image filter that is used for compositing the layer and the content behind it.

(Inherited from CALayer)
Constraints (Inherited from CALayer)
Contents

The contents of this layer, as a CGImage.

(Inherited from CALayer)
ContentsAreFlipped

Whether the layer's contents are implicitly flipped when the layer is rendered.

(Inherited from CALayer)
ContentsCenter (Inherited from CALayer)
ContentsFormat

Gets the contents format for the layer.

(Inherited from CALayer)
ContentsGravity (Inherited from CALayer)
ContentsRect (Inherited from CALayer)
ContentsScale

The scale factor applied to the layer.

(Inherited from CALayer)
CornerRadius

The radius used when drawing rounded corners.

(Inherited from CALayer)
DebugDescription

A developer-meaningful description of this object.

(Inherited from NSObject)
Delegate

An instance of the CoreAnimation.ICALayerDelegate model class which acts as the class delegate.

(Inherited from CALayer)
Description

Description of the object, the Objective-C version of ToString.

(Inherited from NSObject)
DoubleSided

Whether the layer draws its content when facing away from the viewer.

(Inherited from CALayer)
DrawsAsynchronously

Whether drawing commands are deferred and processed asynchronously on a background thread.

(Inherited from CALayer)
Duration

The animation duration of this layer, in seconds.

(Inherited from CALayer)
EdgeAntialiasingMask (Inherited from CALayer)
EndPoint

The end point for the gradient. This property can be animated.

FillMode

The fill mode for this layer, as defined by the values in CAFillMode.

(Inherited from CALayer)
Filters

An array of Core Image filters applied to the content of this layer and its sublayers.

(Inherited from CALayer)
Frame (Inherited from CALayer)
GeometryFlipped (Inherited from CALayer)
GradientLayerAxial

Represents the value associated with the constant kCAGradientLayerAxial

Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
Hidden

Whether the layer is not displayed.

(Inherited from CALayer)
IsDirectBinding (Inherited from NSObject)
IsProxy (Inherited from NSObject)
LayerType
LayoutManager (Inherited from CALayer)
Locations

Optional array of NSNumbers that describe the position of each gradient stop. This property can be animated.

MagnificationFilter (Inherited from CALayer)
Mask

An optional layer, the alpha channel of which is used to mask the contents of this layer.

(Inherited from CALayer)
MaskedCorners (Inherited from CALayer)
MasksToBounds

Whether sublayers are clipped to the Bounds of this layer.

(Inherited from CALayer)
MinificationFilter (Inherited from CALayer)
MinificationFilterBias (Inherited from CALayer)
ModelLayer (Inherited from CALayer)
Name (Inherited from CALayer)
NeedsDisplay

Whether the layer has been marked as requiring an update.

(Inherited from CALayer)
NeedsDisplayOnBoundsChange (Inherited from CALayer)
Opacity

The transparency of the layer, in the range 0 (transparent) to 1.0 (opaque).

(Inherited from CALayer)
Opaque

Whether the layer and its contents are completely opaque.

(Inherited from CALayer)
Position

The layer's position in the coordinate space of its SuperLayer.

(Inherited from CALayer)
PresentationLayer (Inherited from CALayer)
RasterizationScale (Inherited from CALayer)
RepeatCount (Inherited from CALayer)
RepeatDuration (Inherited from CALayer)
RetainCount

Returns the current Objective-C retain count for the object.

(Inherited from NSObject)
Self (Inherited from NSObject)
ShadowColor (Inherited from CALayer)
ShadowOffset (Inherited from CALayer)
ShadowOpacity (Inherited from CALayer)
ShadowPath (Inherited from CALayer)
ShadowRadius (Inherited from CALayer)
ShouldRasterize (Inherited from CALayer)
Speed (Inherited from CALayer)
StartPoint

Starting point for the gradient.

Style (Inherited from CALayer)
Sublayers (Inherited from CALayer)
SublayerTransform (Inherited from CALayer)
Superclass (Inherited from NSObject)
SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
SuperLayer (Inherited from CALayer)
TimeOffset (Inherited from CALayer)
Transform (Inherited from CALayer)
Type

The gradient type displayed, you can set it to GradientLayerDisplay.

VisibleRect (Inherited from CALayer)
WeakDelegate

An object that can respond to the delegate protocol for this type

(Inherited from CALayer)
Zone (Inherited from NSObject)
ZPosition (Inherited from CALayer)

Methods

ActionForKey(String)

Returns the Actions value associated with the specified key.

(Inherited from CALayer)
AddAnimation(CAAnimation, String)

Adds the animation to the render tree for the layer and associates it in Actions with the key key.

(Inherited from CALayer)
AddConstraint(CAConstraint) (Inherited from CALayer)
AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using NSString keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using string keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddSublayer(CALayer)

Appends the layer to this layer's Sublayers.

(Inherited from CALayer)
AnimationForKey(String)

Returns the animation associated with the key.

(Inherited from CALayer)
AwakeFromNib()

Called after the object has been loaded from the nib file. Overriders must call base.AwakeFromNib().

(Inherited from NSObject)
BeginInvokeOnMainThread(Action) (Inherited from NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
Bind(NSString, NSObject, String, NSDictionary) (Inherited from NSObject)
Bind(String, NSObject, String, NSDictionary) (Inherited from NSObject)
BindingInfo(String) (Inherited from NSObject)
BindingOptionDescriptions(String) (Inherited from NSObject)
BindingValueClass(String) (Inherited from NSObject)
Clone(CALayer)

This method should be overwritten to provide cloning capabilities for the layer.

(Inherited from CALayer)
CommitEditing() (Inherited from NSObject)
CommitEditing(NSObject, Selector, IntPtr) (Inherited from NSObject)
ConformsToProtocol(IntPtr)

Invoked to determine if this object implements the specified protocol.

(Inherited from NSObject)
Contains(CGPoint) (Inherited from CALayer)
ConvertPointFromLayer(CGPoint, CALayer) (Inherited from CALayer)
ConvertPointToLayer(CGPoint, CALayer) (Inherited from CALayer)
ConvertRectFromLayer(CGRect, CALayer) (Inherited from CALayer)
ConvertRectToLayer(CGRect, CALayer) (Inherited from CALayer)
ConvertTimeFromLayer(Double, CALayer) (Inherited from CALayer)
ConvertTimeToLayer(Double, CALayer) (Inherited from CALayer)
Copy()

Performs a copy of the underlying Objective-C object.

(Inherited from NSObject)
Create()
CreateColor(IntPtr)
DangerousAutorelease() (Inherited from NSObject)
DangerousRelease() (Inherited from NSObject)
DangerousRetain() (Inherited from NSObject)
DidChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates a change occurred to the indexes for a to-many relationship.

(Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
DidChangeValue(String)

Indicates that a change occurred on the specified key.

(Inherited from NSObject)
Display() (Inherited from CALayer)
DisplayIfNeeded() (Inherited from CALayer)
Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean)

Releases the resources used by the CALayer object.

(Inherited from CALayer)
DoesNotRecognizeSelector(Selector)

Indicates that this object does not recognize the specified selector.

(Inherited from NSObject)
DrawInContext(CGContext)

Draws the layer on the specified context.

(Inherited from CALayer)
EncodeTo(NSCoder)

Encodes the state of the object on the provided encoder

(Inherited from CALayer)
Equals(NSObject) (Inherited from NSObject)
Equals(Object) (Inherited from NSObject)
ExposedBindings() (Inherited from NSObject)
GetBindingInfo(NSString) (Inherited from NSObject)
GetBindingOptionDescriptions(NSString) (Inherited from NSObject)
GetBindingValueClass(NSString) (Inherited from NSObject)
GetContentsAs<T>() (Inherited from CALayer)
GetDictionaryOfValuesFromKeys(NSString[])

Retrieves the values of the specified keys.

(Inherited from NSObject)
GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetMethodForSelector(Selector) (Inherited from NSObject)
GetNativeField(String) (Inherited from NSObject)
GetNativeHash() (Inherited from NSObject)
HitTest(CGPoint)

The furthest descendant in this layer's hierarchy that contains the point p.

(Inherited from CALayer)
Init() (Inherited from NSObject)
InitializeHandle(IntPtr) (Inherited from NSObject)
InitializeHandle(IntPtr, String) (Inherited from NSObject)
InsertSublayer(CALayer, Int32)

Inserts the specified layer into the Sublayers array at the specified index.

(Inherited from CALayer)
InsertSublayerAbove(CALayer, CALayer)

Inserts the specified layer into the Sublayers array immediately after sibling.

(Inherited from CALayer)
InsertSublayerBelow(CALayer, CALayer)

Inserts the specified layer into the Sublayers array immediately prior to sibling.

(Inherited from CALayer)
Invoke(Action, Double) (Inherited from NSObject)
Invoke(Action, TimeSpan) (Inherited from NSObject)
InvokeOnMainThread(Action) (Inherited from NSObject)
InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) (Inherited from NSObject)
IsKindOfClass(Class) (Inherited from NSObject)
IsMemberOfClass(Class) (Inherited from NSObject)
LayoutIfNeeded() (Inherited from CALayer)
LayoutSublayers() (Inherited from CALayer)
MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
NeedsLayout() (Inherited from CALayer)
ObjectDidEndEditing(NSObject) (Inherited from NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr)

Indicates that the value at the specified keyPath relative to this object has changed.

(Inherited from NSObject)
PerformSelector(Selector) (Inherited from NSObject)
PerformSelector(Selector, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSObject, Double)

Invokes the selector on the current instance and if the obj is not null, it passes this as its single parameter.

(Inherited from NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSObject, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (Inherited from NSObject)
PreferredFrameSize()

The preferred size for this layer, in the coordinate of its SuperLayer.

(Inherited from CALayer)
PrepareForInterfaceBuilder() (Inherited from NSObject)
RemoveAllAnimations()

Removes all animations currently attached to the layer.

(Inherited from CALayer)
RemoveAnimation(String)

Removes the specified animation from the layer.

(Inherited from CALayer)
RemoveFromSuperLayer()

Removes this from its SuperLayer.

(Inherited from CALayer)
RemoveObserver(NSObject, NSString)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, String)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RenderInContext(CGContext)

Renders the layer into the specified CGContext.

(Inherited from CALayer)
ReplaceSublayer(CALayer, CALayer) (Inherited from CALayer)
Resize(CGSize) (Inherited from CALayer)
ResizeSublayers(CGSize) (Inherited from CALayer)
RespondsToSelector(Selector)

Whether this object recognizes the specified selector.

(Inherited from NSObject)
ScrollPoint(CGPoint) (Inherited from CALayer)
ScrollRectToVisible(CGRect) (Inherited from CALayer)
SetContents(NSObject) (Inherited from CALayer)
SetNativeField(String, NSObject) (Inherited from NSObject)
SetNeedsDisplay() (Inherited from CALayer)
SetNeedsDisplayInRect(CGRect) (Inherited from CALayer)
SetNeedsLayout() (Inherited from CALayer)
SetNilValueForKey(NSString)

Sets the value of the specified key to null.

(Inherited from NSObject)
SetValueForKey(NSObject, NSString)

Sets the value of the property specified by the key to the specified value.

(Inherited from NSObject)
SetValueForKeyPath(IntPtr, NSString)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

(Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString)

Sets the value of a property that can be reached using a keypath.

(Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString)

Indicates an attempt to write a value to an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary)

Sets the values of this NSObject to those in the specified dictionary.

(Inherited from NSObject)
ToString()

Returns a string representation of the value of the current instance.

(Inherited from NSObject)
Unbind(NSString) (Inherited from NSObject)
Unbind(String) (Inherited from NSObject)
ValueForKey(NSString)

Returns the value of the property associated with the specified key.

(Inherited from NSObject)
ValueForKeyPath(NSString)

Returns the value of a property that can be reached using a keypath.

(Inherited from NSObject)
ValueForUndefinedKey(NSString)

Indicates an attempt to read a value of an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
WillChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates that the values of the specified indices in the specified key are about to change.

(Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
WillChangeValue(String)

Indicates that the value of the specified key is about to change.

(Inherited from NSObject)

Extension Methods

ObjectDidBeginEditing(NSObject, INSEditor)
ObjectDidEndEditing(NSObject, INSEditor)
GetValidModes(NSObject, NSFontPanel)
ValidateToolbarItem(NSObject, NSToolbarItem)
GetDebugDescription(INSObjectProtocol)
AcceptsPreviewPanelControl(NSObject, QLPreviewPanel)
BeginPreviewPanelControl(NSObject, QLPreviewPanel)
EndPreviewPanelControl(NSObject, QLPreviewPanel)
GetAccessibilityCustomRotors(NSObject)

Gets the array of UIAccessibilityCustomRotor objects appropriate for this object.

SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

Sets the array of UIAccessibilityCustomRotor objects appropriate for this object.

Applies to

See also