Inherits from CALayer
Declared in TKGaugeSegment.h

Overview

Represents the view of a TKGaugeSegment.

Properties

allowTouch

Allows interaction with the segment and changing its value.

@property (nonatomic) BOOL allowTouch

Declared In

TKGaugeSegment.h

cap

Defines weather the cap of the segment is round or edge.

@property (nonatomic) TKGaugeSegmentCap cap

Declared In

TKGaugeSegment.h

fill

Represents the segment’s fill.

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

Declared In

TKGaugeSegment.h

location

Represents the location of the segment from bottom to top. The value could be from 0 to 1.

@property (nonatomic) CGFloat location

Declared In

TKGaugeSegment.h

owner

The scale that owns this segment.

@property (nonatomic, weak, nullable) TKGaugeScale *owner

Declared In

TKGaugeSegment.h

range

An object representing the minimum and maximum value of the segment.

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

Declared In

TKGaugeSegment.h

stroke

Represents the segment’s stroke.

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

Declared In

TKGaugeSegment.h

width

Represents the segment’s width on the left/upper side.

@property (nonatomic) CGFloat width

Declared In

TKGaugeSegment.h

width2

Represents the segment’s width on the right/bottom side.

@property (nonatomic) CGFloat width2

Declared In

TKGaugeSegment.h

Instance Methods

initWithMinimum:maximum:

Initializes segment with minimum and maximum value.

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

Parameters

minimum

The minimum value of the segment.

maximum

The maximum value of the segment.

Declared In

TKGaugeSegment.h

initWithRange:

Initializes segment with TKRange.

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

Parameters

range

TKRange object definind the minimum and maximum value of the segment.

Declared In

TKGaugeSegment.h

setRangeAnimated:withDuration:mediaTimingFunction:

This method changes the range of the segment through animation.

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

Parameters

value

The new range to be set.

duration

The duration of the animation.

functionName

The media timing function to be uset with the animation.

Declared In

TKGaugeSegment.h