iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIDrawableText

@interface SCIDrawableText : NSObject <ISCIInvalidatableElement, ISCICleanable>

Provides a class whicih can draw NSAttributedString onto CGContextRef.

  • Defines the string with label value for this annotation.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *text;

    Swift

    var text: String! { get set }
  • Defines the attributed string with label value for this annotation.

    Warning

    If set - Ignores the labelValue.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSAttributedString *attributedText;

    Swift

    @NSCopying var attributedText: NSAttributedString! { get set }
  • Defines the font style for text.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) SCIFontStyle *fontStyle;

    Swift

    var fontStyle: SCIFontStyle! { get set }
  • Gets or sets the rotation angle for this text in degrees.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) float rotationAngle;

    Swift

    var rotationAngle: Float { get set }
  • Returns TickLabel size in Pixels.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGSize drawableSize;

    Swift

    var drawableSize: CGSize { get }
  • The default spacing used when laying out internal text.

    Note

    Sizes are in Points.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIEdgeInsets padding;

    Swift

    var padding: UIEdgeInsets { get set }
  • Returns DrawableText size including margins in Points.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGSize sizeWithMargins;

    Swift

    var sizeWithMargins: CGSize { get }
  • Tries to draw this DrawableText instance onto CGContextRef at specified CGPoint.

    Declaration

    Objective-C

    - (void)tryDrawToCGContext:(CGContextRef)context;

    Swift

    func tryDraw(to context: CGContext!)

    Parameters

    context

    The CGContextRef instance to draw text on.

  • Draws this text instance inside passed in frame.

    Declaration

    Objective-C

    - (void)onDrawTextWithContext:(id<ISCIRenderContext2D>)renderContext
                     assetManager:(id<ISCIAssetManager2D>)assetManager
                          inFrame:(CGRect)frame;

    Swift

    func onDraw(with renderContext: ISCIRenderContext2D!, assetManager: ISCIAssetManager2D!, inFrame frame: CGRect)

    Parameters

    renderContext

    The render context instance to draw on.

    assetManager

    The asset manager associated with render context.

    frame

    The frame to draw text in.