Inherits from TKGaugeIndicator : CALayer
Declared in TKGaugeNeedle.h

Overview

Represents a needle indicator used in linear and radial gauges.

Properties

circleFill

Defines the needle circle fill.

@property (nonatomic, strong, nullable) TKFill *circleFill

Declared In

TKGaugeNeedle.h

circleInnerRadius

Defines the needle center inner radius.

@property (nonatomic) CGFloat circleInnerRadius

Declared In

TKGaugeNeedle.h

circleRadius

Defines the needle center radius.

@property (nonatomic) CGFloat circleRadius

Declared In

TKGaugeNeedle.h

circleStroke

Defines the needle circle stroke.

@property (nonatomic, strong, nullable) TKStroke *circleStroke

Declared In

TKGaugeNeedle.h

length

Defines the needle length. The needle length is calculated in normalized coordinates between 0 and 1.

@property (nonatomic) CGFloat length

Declared In

TKGaugeNeedle.h

offset

Defines an offset to be added to the needle bottom.

@property (nonatomic) CGFloat offset

Declared In

TKGaugeNeedle.h

topWidth

Defines the top width of the needle.

@property (nonatomic) CGFloat topWidth

Declared In

TKGaugeNeedle.h

width

Defines the bottom width of the needle.

@property (nonatomic) CGFloat width

Declared In

TKGaugeNeedle.h

Instance Methods

initWithValue:

Initializes scale with a value.

- (instancetype __nonnull)initWithValue:(CGFloat)value

Parameters

value

The needle value.

Declared In

TKGaugeNeedle.h

initWithValue:length:

Initializes scale with a value and length.

- (instancetype __nonnull)initWithValue:(CGFloat)value length:(CGFloat)length

Parameters

value

The needle value.

length

The needle length. The needle length is calculated in normalized coordinates between 0 and 1.

Declared In

TKGaugeNeedle.h

setValueAnimated:withDuration:mediaTimingFunction:

Sets the needle value using animation.

- (void)setValueAnimated:(CGFloat)value withDuration:(CGFloat)duration mediaTimingFunction:(NSString *__nonnull)functionName

Parameters

value

The needle value.

duration

The animation duration.

functionName

The name of the easing function to be used.

Declared In

TKGaugeNeedle.h