Layer

public class Layer: CALayer

A subclass of CALayer that has a rotation property.

  • The value of the receiver’s current rotation state. This value is cumulative, and can represent values beyong +/- π

    Declaration

    Swift

    public dynamic var rotation: Double
  • Initializes a new Layer

    Declaration

    Swift

    public override init()
  • Initializes a new Layer from a specified layer of any other type. - parameter layer: Another CALayer

    Declaration

    Swift

    public override init(layer: AnyObject)

    Parameters

    layer

    Another CALayer

  • Initializes a new Layer from data in a given unarchiver. - parameter coder: An unarchiver object.

    Declaration

    Swift

    public required init?(coder: NSCoder)

    Parameters

    coder

    An unarchiver object.

  • Sets a value for a given key. - parameter value: The value for the property identified by key. - parameter key: The name of one of the receiver’s properties

    Declaration

    Swift

    public override func setValue(value: AnyObject?, forKey key: String)

    Parameters

    value

    The value for the property identified by key.

    key

    The name of one of the receiver’s properties

  • This method searches for the given action object of the layer. Actions define dynamic behaviors for a layer. For example, the animatable properties of a layer typically have corresponding action objects to initiate the actual animations. When that property changes, the layer looks for the action object associated with the property name and executes it. You can also associate custom action objects with your layer to implement app-specific actions. - parameter key: The identifier of the action. - returns: the action object assigned to the specified key.

    Declaration

    Swift

    public override func actionForKey(key: String) -> CAAction?

    Parameters

    key

    The identifier of the action.

    Return Value

    the action object assigned to the specified key.

  • Returns a Boolean indicating whether changes to the specified key require the layer to be redisplayed. - parameter key: A string that specifies an attribute of the layer. - returns: A Boolean indicating whether changes to the specified key require the layer to be redisplayed.

    Declaration

    Swift

    public override class func needsDisplayForKey(key: String) -> Bool

    Parameters

    key

    A string that specifies an attribute of the layer.

    Return Value

    A Boolean indicating whether changes to the specified key require the layer to be redisplayed.

  • Reloads the content of this layer. Do not call this method directly.

    Declaration

    Swift

    public override func display()