Inherits from CALayer
Declared in TKGaugeScale.h

Overview

Represents the view of the gauge’s scale.

Properties

fill

Defines the scale fill.

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

Declared In

TKGaugeScale.h

indicators

Contains all the indicators added to the scale.

@property (nonatomic, strong, readonly, nonnull) NSArray<__kindofTKGaugeIndicator*> *indicators

Declared In

TKGaugeScale.h

labels

Instance representing the labels of the scale.

@property (nonatomic, strong, readonly, nonnull) TKGaugeLabels *labels

Declared In

TKGaugeScale.h

owner

Represents the instance of TKGauge that owns this scale.

@property (nonatomic, weak, null_unspecified) TKGauge *owner

Declared In

TKGaugeScale.h

range

Defines the minimum and maximum value of the scale.

@property (nonatomic, strong, nonnull) TKRange *range

Declared In

TKGaugeScale.h

segments

Contains all the segments added to the scale.

@property (nonatomic, strong, readonly, nonnull) NSArray<TKGaugeSegment*> *segments

Declared In

TKGaugeScale.h

stroke

Defines the scale stroke.

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

Declared In

TKGaugeScale.h

ticks

Instance representing the ticks of the scale.

@property (nonatomic, strong, readonly, nonnull) TKGaugeTicks *ticks

Declared In

TKGaugeScale.h

Instance Methods

addIndicator:

Adds indicator to the scale.

- (void)addIndicator:(TKGaugeIndicator *__nonnull)indicator

Parameters

indicator

The indicator to be added.

Declared In

TKGaugeScale.h

addSegment:

Adds segment to the scale.

- (void)addSegment:(TKGaugeSegment *__nonnull)segment

Parameters

segment

The segment to be added.

Declared In

TKGaugeScale.h

indicatorAtIndex:

Returns indicator from the scale by given index.

- (TKGaugeIndicator *__nullable)indicatorAtIndex:(int)index

Parameters

index

The index of the indicator to be returned.

Declared In

TKGaugeScale.h

initWithMinimum:maximum:

Initializes scale with minimum and maximum value.

- (instancetype __nonnull)initWithMinimum:(id __nonnull)minimum maximum:(id __nonnull)maximum

Parameters

minimum

The minimum value of the scale.

maximum

The maximum value of the scale.

Declared In

TKGaugeScale.h

initWithRange:

Initializes scale with TKRange.

- (instancetype __nonnull)initWithRange:(TKRange *__nonnull)range

Parameters

range

TKRange instance that defines the minumum and maximum value of the scale.

Declared In

TKGaugeScale.h

insertIndicator:atIndex:

Inserts indicator to the scale at given index.

- (void)insertIndicator:(TKGaugeIndicator *__nonnull)indicator atIndex:(int)index

Parameters

indicator

The indicator to be added.

index

The index for the indicator to be insert at.

Declared In

TKGaugeScale.h

insertSegment:atIndex:

Inserts segment to the scale at given index.

- (void)insertSegment:(TKGaugeSegment *__nonnull)segment atIndex:(int)index

Parameters

segment

The segment to be added.

index

The index for the segment to be insert at.

Declared In

TKGaugeScale.h

locationForValue:

Returns the screen coordinates of a given value

- (CGFloat)locationForValue:(CGFloat)value

Parameters

value

The value.

Declared In

TKGaugeScale.h

removeAllIndicators

Removes all indicators from the scale.

- (void)removeAllIndicators

Declared In

TKGaugeScale.h

removeAllSegments

Removes all segments from the scale.

- (void)removeAllSegments

Declared In

TKGaugeScale.h

removeIndicator:

Removes indicator from the scale.

- (void)removeIndicator:(TKGaugeIndicator *__nonnull)indicator

Parameters

indicator

The indicator to be removed.

Declared In

TKGaugeScale.h

removeIndicatorAtIndex:

Removes indicator from the scale by given index.

- (void)removeIndicatorAtIndex:(int)index

Parameters

index

The index of the indicator to be removed.

Declared In

TKGaugeScale.h

removeSegment:

Removes segment from the scale.

- (void)removeSegment:(TKGaugeSegment *__nonnull)segment

Parameters

segment

The segment to be removed.

Declared In

TKGaugeScale.h

removeSegmentAtIndex:

Removes segment from the scale by given index.

- (void)removeSegmentAtIndex:(int)index

Parameters

index

The index of the segment to be removed.

Declared In

TKGaugeScale.h

segmentAtIndex:

Returns segment from the scale by given index.

- (TKGaugeSegment *__nullable)segmentAtIndex:(int)index

Parameters

index

The index of the segment to be returned.

Declared In

TKGaugeScale.h

textForValue:

Returns the text representation for a given value.

- (NSString *__nonnull)textForValue:(CGFloat)value

Parameters

value

The value.

Declared In

TKGaugeScale.h

valueForPoint:

Returns the value for given coordinates on the screen.

- (CGFloat)valueForPoint:(CGPoint)point

Parameters

point

The coordinates of the value to be returned.

Declared In

TKGaugeScale.h