Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
A container layer for annotations. More...
#import <CPTAnnotationHostLayer.h>
Public Instance Methods | |
Annotations | |
(void) | - addAnnotation: |
Adds an annotation to the receiver. More... | |
(void) | - removeAnnotation: |
Removes an annotation from the receiver. More... | |
(void) | - removeAllAnnotations |
Removes all annotations from the receiver. More... | |
Initialization | |
(nonnull instancetype) | - initWithFrame: [implementation] |
Initializes a newly allocated CPTAnnotationHostLayer object with the provided frame rectangle. More... | |
User Interaction | |
(BOOL) | - pointingDeviceDownEvent:atPoint: [implementation] |
Informs the receiver that the user has touched the screen. More... | |
(BOOL) | - pointingDeviceUpEvent:atPoint: [implementation] |
Informs the receiver that the user has lifted their finger off the screen. More... | |
(BOOL) | - pointingDeviceDraggedEvent:atPoint: [implementation] |
Informs the receiver that the user has moved their finger while touching the screen. More... | |
(BOOL) | - pointingDeviceCancelledEvent: [implementation] |
Informs the receiver that tracking of touches has been cancelled for any reason. More... | |
Public Instance Methods inherited from CPTLayer | |
(nullable instancetype) | - initWithCoder: |
Returns an object initialized from data in a given unarchiver. More... | |
(nonnull instancetype) | - initWithLayer: |
Override to copy or initialize custom fields of the specified layer. More... | |
(nonnull instancetype) | - init [implementation] |
Initializes a newly allocated CPTLayer object with an empty frame rectangle. More... | |
(void) | - logLayers |
Logs this layer and all of its sublayers. More... | |
(BOOL) | - pointingDeviceDownEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceUpEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceDraggedEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceCancelledEvent: [implementation] |
(nullable CPTNativeImage *) | - imageOfLayer |
Gets an image of the layer contents. More... | |
(void) | - setNeedsDisplayAllLayers |
Recursively marks this layer and all sublayers as needing to be redrawn. More... | |
(void) | - renderAsVectorInContext: |
Draws layer content into the provided graphics context. More... | |
(void) | - recursivelyRenderInContext: |
Draws layer content and the content of all sublayers into the provided graphics context. More... | |
(void) | - layoutAndRenderInContext: |
Updates the layer layout if needed and then draws layer content and the content of all sublayers into the provided graphics context. More... | |
(nonnull NSData *) | - dataForPDFRepresentationOfLayer |
Draws layer content and the content of all sublayers into a PDF document. More... | |
(void) | - applySublayerMaskToContext:forSublayer:withOffset: |
Recursively sets the clipping path of the given graphics context to the sublayer masking paths of its superlayers. More... | |
(void) | - applyMaskToContext: |
Sets the clipping path of the given graphics context to mask the content. More... | |
(void) | - pixelAlign |
Align the receiver’s position with pixel boundaries. More... | |
(void) | - sublayerMarginLeft:top:right:bottom: |
Returns the margins that should be left between the bounds of the receiver and all sublayers. More... | |
(void) | - layoutSublayers [implementation] |
Updates the layout of all sublayers. Sublayers fill the super layer’s bounds minus any padding. More... | |
Public Instance Methods inherited from CALayer | |
(BOOL) | - containsPoint: |
(void) | - drawInContext: |
(id) | - init |
(id) | - initWithLayer |
(void) | - layoutSublayers |
(void) | - setNeedsDisplay |
(void) | - setNeedsDisplayInRect: |
(void) | - setNeedsLayout |
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: |
User Interaction |
Properties | |
CPTAnnotationArray * | annotations |
An array of annotations attached to this layer. More... | |
Properties inherited from CPTLayer | |
CPTGraph * | graph |
The graph for the layer. More... | |
CGFloat | paddingLeft |
Amount to inset the left side of each sublayer. More... | |
CGFloat | paddingTop |
Amount to inset the top of each sublayer. More... | |
CGFloat | paddingRight |
Amount to inset the right side of each sublayer. More... | |
CGFloat | paddingBottom |
Amount to inset the bottom of each sublayer. More... | |
id< NSCopying, NSCoding, NSObject > | identifier |
An object used to identify the layer in collections. More... | |
CGFloat | contentsScale |
The scale factor applied to the layer. More... | |
BOOL | useFastRendering |
If YES, subclasses should optimize their drawing for speed over precision. More... | |
CPTShadow * | shadow |
The shadow drawn under the layer content. If nil (the default), no shadow is drawn. More... | |
CGSize | shadowMargin |
The maximum margin size needed to fully enclose the layer shadow. More... | |
BOOL | masksToBorder |
If YES, a sublayer mask is applied to clip sublayer content to the inside of the border. More... | |
CGPathRef | outerBorderPath |
A drawing path that encompasses the outer boundary of the layer border. More... | |
CGPathRef | innerBorderPath |
A drawing path that encompasses the inner boundary of the layer border. More... | |
CGPathRef | maskingPath |
A drawing path that encompasses the layer content including any borders. Set to NULL when no masking is desired. More... | |
CGPathRef | sublayerMaskingPath |
A drawing path that encompasses the layer content excluding any borders. Set to NULL when no masking is desired. More... | |
CPTSublayerSet * | sublayersExcludedFromAutomaticLayout |
A set of sublayers that should be excluded from the automatic sublayer layout. More... | |
Properties inherited from CALayer | |
CGPoint | anchorPoint |
CGRect | bounds |
CGFloat | contentsScale |
CGFloat | cornerRadius |
id | delegate |
CGRect | frame |
BOOL | masksToBounds |
BOOL | needsDisplayOnBoundsChange |
BOOL | opacity |
BOOL | opaque |
Properties inherited from <CAMediaTiming> | |
BOOL | autoreverses |
CFTimeInterval | beginTime |
CFTimeInterval | duration |
NSString * | fillMode |
float | repeatCount |
id | repeatDuration |
float | speed |
CFTimeInterval | timeOffset |
Additional Inherited Members | |
Public Class Methods inherited from CALayer | |
(id) | + layer |
Public Class Methods inherited from NSObject | |
(id) | + alloc |
(Class) | + class |
(void) | + initialize |
(void) | + load |
(id) | + new |
Public Class Methods inherited from <NSSecureCoding> | |
(BOOL) | + supportsSecureCoding: |
A container layer for annotations.
Annotations (CPTAnnotation) can be added to and removed from an annotation layer. The host layer automatically handles the annotation layout.
- (void) addAnnotation: | (nullable CPTAnnotation *) | annotation |
Adds an annotation to the receiver.
|
implementation |
Initializes a newly allocated CPTAnnotationHostLayer object with the provided frame rectangle.
This is the designated initializer. The initialized layer will have an empty annotations array.
newFrame | The frame rectangle. |
Reimplemented from CPTLayer.
Reimplemented in CPTPieChart, CPTPlot, CPTTradingRangePlot, CPTRangePlot, CPTBarPlot, CPTScatterPlot, CPTGraph, CPTLegend, CPTPlotArea, CPTBorderedLayer, CPTPlotAreaFrame, and CPTXYGraph.
|
implementation |
Informs the receiver that tracking of touches has been cancelled for any reason.
The event is passed in turn to each annotation layer. If any layer handles the event, subsequent layers are not notified and this method immediately returns YES.
event | The OS event. |
Reimplemented from <CPTResponder>.
Reimplemented in CPTGraph, and CPTPlotAreaFrame.
|
implementation |
Informs the receiver that the user has touched the screen.
The event is passed in turn to each annotation layer that contains the interaction point. If any layer handles the event, subsequent layers are not notified and this method immediately returns YES.
event | The OS event. |
interactionPoint | The coordinates of the interaction. |
Reimplemented from <CPTResponder>.
Reimplemented in CPTPieChart, CPTPlot, CPTTradingRangePlot, CPTRangePlot, CPTBarPlot, CPTScatterPlot, CPTGraph, CPTLegend, CPTPlotArea, and CPTPlotAreaFrame.
|
implementation |
Informs the receiver that the user has moved their finger while touching the screen.
The event is passed in turn to each annotation layer that contains the interaction point. If any layer handles the event, subsequent layers are not notified and this method immediately returns YES.
event | The OS event. |
interactionPoint | The coordinates of the interaction. |
Reimplemented from <CPTResponder>.
Reimplemented in CPTGraph, and CPTPlotAreaFrame.
|
implementation |
Informs the receiver that the user has lifted their finger off the screen.
The event is passed in turn to each annotation layer that contains the interaction point. If any layer handles the event, subsequent layers are not notified and this method immediately returns YES.
event | The OS event. |
interactionPoint | The coordinates of the interaction. |
Reimplemented from <CPTResponder>.
Reimplemented in CPTPieChart, CPTPlot, CPTTradingRangePlot, CPTRangePlot, CPTBarPlot, CPTScatterPlot, CPTGraph, CPTLegend, CPTPlotArea, and CPTPlotAreaFrame.
- (void) removeAllAnnotations |
Removes all annotations from the receiver.
- (void) removeAnnotation: | (nullable CPTAnnotation *) | annotation |
Removes an annotation from the receiver.
|
readnonatomicassign |
An array of annotations attached to this layer.