Inherits from UIControl
Declared in TKMultiSwitch.h
TKMultiSwitch.m

Overview

TKMultiSwitch a slide control with multiple options. Sort of like a UISwitch mixed with a UISegmentControl.

Properties

font

The font used.

@property (nonatomic, strong) UIFont *font

Declared In

TKMultiSwitch.h

indexOfSelectedItem

The index of the selected item.

@property (nonatomic, assign) NSInteger indexOfSelectedItem

Declared In

TKMultiSwitch.h

selectedTextColor

If the style is a filled selection, then this will be used for the current select label.

@property (nonatomic, strong) UIColor *selectedTextColor

Declared In

TKMultiSwitch.h

selectionInset

The select padding.

@property (nonatomic, assign) CGFloat selectionInset

Declared In

TKMultiSwitch.h

style

Choose between a hollow or filled selection indicator.

@property (nonatomic, assign) TKMultiSwitchStyle style

Declared In

TKMultiSwitch.h

textColor

If the style is a filled selection, then this will be used for the current unselected labels.

@property (nonatomic, strong) UIColor *textColor

Declared In

TKMultiSwitch.h

Instance Methods

initWithItems:

Initialize a TKMultiSwitch instance.

- (instancetype)initWithItems:(NSArray *)items

Parameters

items

The items in the switch view.

Return Value

A TKMultiSwitch object.

Declared In

TKMultiSwitch.h

selectItemAtIndex:animated:

Select an item manually.

- (void)selectItemAtIndex:(NSInteger)index animated:(BOOL)animated

Parameters

index

The index of the item.

animated

Animate the selection of the item.

Declared In

TKMultiSwitch.h