Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTAnnotation Class Reference

An annotation positions a content layer relative to some anchor point. More...

#import <CPTAnnotation.h>

+ Inheritance diagram for CPTAnnotation:
+ Collaboration diagram for CPTAnnotation:

Public Instance Methods

Initialization
(nonnull instancetype) - init
 Initializes a newly allocated CPTAnnotation object. More...
 
(nullable instancetype) - initWithCoder:
 
Layout
(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

CPTLayercontentLayer
 The annotation content. More...
 
CPTAnnotationHostLayerannotationHostLayer
 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:
 

Detailed Description

An annotation positions a content layer relative to some anchor point.

Annotations can be used to add text or images that are anchored to a feature of a graph. For example, the graph title is an annotation anchored to the graph. The annotation content layer can be any CPTLayer.

Method Documentation

◆ init

- (nonnull instancetype) init

Initializes a newly allocated CPTAnnotation object.

The initialized object will have the following properties:

Returns
The initialized object.

◆ initWithCoder:

- (nullable instancetype) initWithCoder: (nonnull NSCoder *)  coder

◆ positionContentLayer

- (void) positionContentLayer

Positions the content layer relative to its reference anchor.

This method must be overridden by subclasses. The default implementation does nothing.

Provided by category CPTAnnotation(AbstractMethods).

Property Documentation

◆ annotationHostLayer

- (nullable CPTAnnotationHostLayer *) annotationHostLayer
readwritenonatomicweak

The host layer for the annotation content.

◆ contentAnchorPoint

- (CGPoint) contentAnchorPoint
readwritenonatomicassign

The anchor point for the content layer.

◆ contentLayer

- (nullable CPTLayer *) contentLayer
readwritenonatomicstrong

The annotation content.

◆ displacement

- (CGPoint) displacement
readwritenonatomicassign

The displacement from the layer anchor point.

◆ rotation

- (CGFloat) rotation
readwritenonatomicassign

The rotation of the label in radians.


The documentation for this class was generated from the following files: