Control

Controls allow users to control information on their screen

class kivycupertino.uix.control.CupertinoSegment(*args: Any, **kwargs: Any)

iOS style segment to be used with CupertinoSegmentedControls

color = [0, 0, 0, 1]

Color of text of CupertinoSegment

../_images/color2.png

Python

CupertinoSegment(color=(1, 0, 0, 1))

KV

CupertinoSegment:
    text_color: 1, 0, 0, 1
class kivycupertino.uix.control.CupertinoSegmentedControls(*args: Any, **kwargs: Any)

iOS style Segmented Controls

../_images/demo2.gif
add_widget(widget, index=0, canvas=None)

Add an instance of CupertinoSegment to CupertinoSegmentedControls

background_color = [0.9, 0.9, 0.9, 0.75]

Background color of CupertinoSegmentedControls

../_images/background_color1.png

Python

CupertinoSegmentedControls(background_color=(0.5, 0, 0, 1))

KV

CupertinoSegmentedControls:
    background_color: 0.5, 0, 0, 1
color_selected = [1, 1, 1, 1]

Background color of selected tab of CupertinoSegmentedControls

../_images/color_selected1.png

Python

CupertinoSegmentedControls(color_selected=(1, 0, 0, 1))

KV

CupertinoSegmentedControls:
    color_selected: 1, 0, 0, 1
get_selected_segment()

Get the currently selected segment of CupertinoSegmentedControls

Returns

The selected CupertinoSegment

on_touch_move(touch)

Detect a movement on a segment of CupertinoSegmentedControls

Parameters

touch – Touch on CupertinoSegmentedControls

transition_duration = 0.1

Duration of change of selected segment of CupertinoSegmentedControls

../_images/transition_duration3.gif

Python

CupertinoSegmentedControls(transition_duration=0.5)

KV

CupertinoSegmentedControls:
    transition_duration: 0.5
class kivycupertino.uix.control.CupertinoStepper(*args: Any, **kwargs: Any)

iOS style Stepper

../_images/demo6.gif
add_disabled = False

If add button of CupertinoStepper is disabled

../_images/add_disabled.png

Python

CupertinoStepper(add_disabled=True)

KV

CupertinoStepper:
    add_disabled: True
color_disabled = [0.8, 0.8, 0.8, 1]

Background color of button of CupertinoStepper when disabled

../_images/color_disabled3.png

Python

CupertinoStepper(add_disabled=True, color_disabled=(0.5, 0, 0, 1))

KV

CupertinoStepper:
    add_disabled: True
    color_disabled: 0.5, 0, 0, 1
color_down = [0.7, 0.7, 0.7, 1]

Background color of button of CupertinoStepper when valid

../_images/color_down3.gif

Python

CupertinoStepper(color_down=(0.5, 0, 0, 1))

KV

CupertinoStepper:
    color_down: 0.5, 0, 0, 1
color_normal = [0.9, 0.9, 0.9, 0.75]

Background color of button of CupertinoStepper when not valid

../_images/color_normal3.png

Python

CupertinoStepper(color_normal=(0.5, 0, 0, 1))

KV

CupertinoStepper:
    color_normal: 0.5, 0, 0, 1
minus_disabled = False

If minus button of CupertinoStepper is disabled

../_images/minus_disabled.png

Python

CupertinoStepper(minus_disabled=True)

KV

CupertinoStepper:
    minus_disabled: True
on_minus()

Callback when minus button is valid

on_plus()

Callback when plus button is valid

text_color = [0, 0, 0, 1]

Color of text of button of CupertinoStepper

../_images/text_color1.png

Python

CupertinoStepper(text_color=(1, 0, 0, 1))

KV

CupertinoStepper:
    text_color: 1, 0, 0, 1