Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
Positions a content layer relative to an anchor point in a reference layer. More...
#import <CPTLayerAnnotation.h>
Public Instance Methods | |
Initialization | |
(nonnull instancetype) | - initWithAnchorLayer: |
Initializes a newly allocated CPTLayerAnnotation object with the provided reference layer. More... | |
(nullable instancetype) | - initWithCoder: |
Returns an object initialized from data in a given unarchiver. More... | |
Public Instance Methods inherited from CPTAnnotation | |
(nonnull instancetype) | - init |
Initializes a newly allocated CPTAnnotation object. More... | |
(void) | - positionContentLayer |
Positions the content layer relative to its reference anchor. More... | |
Public Instance Methods inherited from NSObject | |
(Class) | - classForCoder |
(id) | - copy |
(void) | - dealloc |
(void) | - finalize |
(id) | - init |
(id) | - mutableCopy |
Public Instance Methods inherited from <NSObject> | |
(NSString *) | - description |
(NSUInteger) | - hash |
(BOOL) | - isEqual: |
Public Instance Methods inherited from <NSKeyValueBindingCreation> | |
(NSArray *) | - exposedBindings |
(Class) | - valueClassForBinding: |
(void) | - bind:toObject:withKeyPath:options: |
(NSArray *) | - optionDescriptionsForBinding: |
(NSDictionary *) | - infoForBinding: |
(void) | - unbind: |
Public Instance Methods inherited from <NSCoding> | |
(id) | - initWithCoder: |
(void) | - encodeWithCoder: |
Properties | |
CPTLayer * | anchorLayer |
The reference layer. More... | |
CPTRectAnchor | rectAnchor |
The anchor position for the annotation. More... | |
CPTConstraints * | xConstraints |
The constraints used to position the content layer relative to the reference layer in the x-direction. Setting the rectAnchor resets the constraints. More... | |
CPTConstraints * | yConstraints |
The constraints used to position the content layer relative to the reference layer in the y-direction. Setting the rectAnchor resets the constraints. More... | |
Properties inherited from CPTAnnotation | |
CPTLayer * | contentLayer |
The annotation content. More... | |
CPTAnnotationHostLayer * | annotationHostLayer |
The host layer for the annotation content. More... | |
CGPoint | contentAnchorPoint |
The anchor point for the content layer. More... | |
CGPoint | displacement |
The displacement from the layer anchor point. More... | |
CGFloat | rotation |
The rotation of the label in radians. More... | |
Additional Inherited Members | |
Public Class Methods inherited from NSObject | |
(id) | + alloc |
(Class) | + class |
(void) | + initialize |
(void) | + load |
(id) | + new |
Public Class Methods inherited from <NSKeyValueBindingCreation> | |
(void) | + exposeBinding: |
Public Class Methods inherited from <NSSecureCoding> | |
(BOOL) | + supportsSecureCoding: |
Positions a content layer relative to an anchor point in a reference layer.
Layer annotations are positioned relative to a reference layer. This allows the annotation content layer to move with changes in the reference layer. This is useful for applications such as titles attached to an edge of the reference layer.
- (nonnull instancetype) initWithAnchorLayer: | (nonnull CPTLayer *) | newAnchorLayer |
Initializes a newly allocated CPTLayerAnnotation object with the provided reference layer.
This is the designated initializer. The initialized layer will be anchored to CPTRectAnchorTop by default.
newAnchorLayer | The reference layer. Must be non-nil. |
- (nullable instancetype) initWithCoder: | (nonnull NSCoder *) | coder |
Returns an object initialized from data in a given unarchiver.
coder | An unarchiver object. |
Reimplemented from CPTAnnotation.
|
readnonatomicweak |
The reference layer.
|
readwritenonatomicassign |
The anchor position for the annotation.
|
readwritenonatomicstrong |
The constraints used to position the content layer relative to the reference layer in the x-direction. Setting the rectAnchor resets the constraints.
|
readwritenonatomicstrong |
The constraints used to position the content layer relative to the reference layer in the y-direction. Setting the rectAnchor resets the constraints.