Kivy Cupertino


Kivy Cupertino is a collection of iOS style widgets following Apple’s Human Interface guidelines to be used with the Kivy cross-platform graphical framework without sacrificing ease of use or application performance.
Warning
We are currently in beta status; most widgets have been implemented but stability is not guaranteed. We don’t recommend using Kivy Cupertino in production.
Installation
To install Kivy Cupertino from PyPi, use pip
:
$ pip install kivycupertino
To use newly implemented widgets that have not yet been published to PyPI, install from GitHub (not recommended for production use):
$ pip install git+https://github.com/cmdvmd/kivy-cupertino.git
To install Kivy Cupertino for development use, install with the dev extra:
Bar
Bars are generally positioned at the top or bottom of a screen and contain widgets and/or information for easy access by users
iOS style Navigation Bar.
CupertinoNavigationBar
is aRelativeLayout
and can accept any number of widgetsBackground color of
CupertinoNavigationBar
Python
CupertinoNavigationBar(color=(0.5, 0, 0, 1))
KV
CupertinoNavigationBar: color: 0.5, 0, 0, 1
- class kivycupertino.uix.bar.CupertinoTab(*args: Any, **kwargs: Any)
iOS style tab to be used with
CupertinoTabBar
- color_selected = [0.2, 0.45, 1, 1]
Color of the selected tab of
CupertinoTab
Python
CupertinoTabBar(color_selected=(1, 0, 0, 1))
KV
CupertinoTab: color_selected: 1, 0, 0, 1
- color_unselected = [0.7, 0.7, 0.75, 1]
Color of
CupertinoTabBar
when not selectedPython
CupertinoTab(color_unselected=(0.5, 0, 0, 1))
KV
CupertinoTab: color_unselected: 0.5, 0, 0, 1
- symbol = ' '
Symbol of
CupertinoTab
Python
CupertinoTab(symbol='hammer_fill')
KV
CupertinoTab: symbol: 'hammer_fill'
- text = ' '
Text of
CupertinoTab
Python
CupertinoTab(text='Tab')
KV
CupertinoTab: text: 'Tab'
- class kivycupertino.uix.bar.CupertinoTabBar(*args: Any, **kwargs: Any)
iOS style tab bar
- add_widget(widget, index=0, canvas=None)
Add an instance of
CupertinoTab
toCupertinoTabBar
- background_color = [0.95, 0.95, 0.95, 1]
Background color of
CupertinoTabBar
when selectedPython
CupertinoTabBar(background_color=(0.5, 0, 0, 1))
KV
CupertinoTabBar: background_color: 0.5, 0, 0, 1
- get_selected_tab()
Get the currently selected tab of
CupertinoTabBar
- Returns
The selected
CupertinoTab
- class kivycupertino.uix.bar.CupertinoToolbar(*args: Any, **kwargs: Any)
iOS style Toolbar.
CupertinoToolbar
is aRelativeLayout
and can accept any number of widgets- color = [0.95, 0.95, 0.95, 1]
Background color of
CupertinoToolbar
Python
CupertinoToolbar(color=(0.5, 0, 0, 1))
KV
CupertinoToolbar: color: 0.5, 0, 0, 1
Behavior
Behaviors allow for expanded functionality for existing widgets
Note
Behaviors can only be used as superclasses for instances of Widget
- class kivycupertino.uix.behavior.CupertinoButtonBehavior(*args: Any, **kwargs: Any)
Base class for buttons that can only be used with an instance of
kivy.uix.widget.Widget
- color
Current color of a widget with
CupertinoButtonBehavior
- color_disabled
Color of widget with
CupertinoButtonBehavior
when disabledPython
CupertinoButton(disabled=True, color_disabled=(0.5, 0, 0, 1))
KV
CupertinoButton: disabled: True color_disabled: 0.5, 0, 0, 1
- color_down
Color of widget with
CupertinoButtonBehavior
when pressedPython
CupertinoButton(color_down=(1, 0, 0, 1))
KV
CupertinoButton: color_down: 1, 0, 0, 1
- color_normal
Color of widget with
CupertinoButtonBehavior
when not pressed or disabledPython
CupertinoButton(color_normal=(1, 0, 0, 1))
KV
CupertinoButton: color_normal: 1, 0, 0, 1
- disabled
If widget with
CupertinoButtonBehavior
is disabledPython
CupertinoButton(disabled=True)
KV
CupertinoButton: disabled: True
- transition_duration = 0.075
Duration of the transition of the color of widget with
CupertinoButtonBehavior
when its state changesPython
CupertinoButton(transition_duration=0.5)
KV
CupertinoButton: transition_duration: 0.5
- class kivycupertino.uix.behavior.LongPressBehavior(**kwargs)
Behavior to detect a long press on a widget
- long_press_duration = 1
Time that constitutes a long press
Python
ExampleWidget(long_press_duration=2)
KV
ExampleWidget: long_press_duration: 2
- on_long_press(touch)
Event when a widget is long pressed
- Parameters
touch – The touch on this widget
- class kivycupertino.uix.behavior.SelectableBehavior(**kwargs)
Behavior to detect a selection of a specific widget among all other widgets in
parent
- on_chosen()
Event when a widget is selected
- on_selected(instance, value)
Callback when
selected
of a widget withSelectableBehavior
is changed- Parameters
instance – Instance of widget with
SelectableBehavior
value – Value of
selected
- refresh()
Set
selected
of this instance ofSelectableBehavior
toTrue
while setting all other instances inparent
toFalse
Note
This function is mainly to be used when adding widgets to a parent. Otherwise, setting
selected
toTrue
will achieve this
- selected = False
If a widget is selected in its
parent
Python
ExampleWidget(selected=True)
KV
ExampleWidget: selected: True
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
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
- add_widget(widget, index=0, canvas=None)
Add an instance of
CupertinoSegment
toCupertinoSegmentedControls
- background_color = [0.9, 0.9, 0.9, 0.75]
Background color of
CupertinoSegmentedControls
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
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
Python
CupertinoSegmentedControls(transition_duration=0.5)
KV
CupertinoSegmentedControls: transition_duration: 0.5
- class kivycupertino.uix.control.CupertinoStepper(*args: Any, **kwargs: Any)
iOS style Stepper
- add_disabled = False
If add button of
CupertinoStepper
is disabledPython
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 disabledPython
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 validPython
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 validPython
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 disabledPython
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
Python
CupertinoStepper(text_color=(1, 0, 0, 1))
KV
CupertinoStepper: text_color: 1, 0, 0, 1
Indicator
Indicators help show progress to users
- class kivycupertino.uix.indicator.CupertinoActivityIndicator(*args: Any, **kwargs: Any)
iOS style activity indicator
- color = [0.6, 0.6, 0.65, 1]
Color of the spokes of
CupertinoActivityIndicator
Python
CupertinoActivityIndicator(color=(1, 0, 0, 1))
KV
CupertinoActivityIndicator: color: 1, 0, 0, 1
- duration = 1
Time for one cycle of
CupertinoActivityIndicator
(in seconds)Python
CupertinoActivityIndicator(duration=2)
KV
CupertinoActivityIndicator: duration: 2
- playing = False
Color of the spokes of
CupertinoActivityIndicator
Python
CupertinoActivityIndicator(playing=True)
KV
CupertinoActivityIndicator: playing: True
- spokes = 12
Amount of spokes of
CupertinoActivityIndicator
Python
CupertinoActivityIndicator(spokes=20)
KV
CupertinoActivityIndicator: spokes: 20
- class kivycupertino.uix.indicator.CupertinoProgressbar(*args: Any, **kwargs: Any)
iOS style Progress Bar
- color_selected = [0, 0.5, 1, 1]
Color of the bar of occurred progress of
CupertinoProgressBar
Python
CupertinoProgressbar(color_selected=(1, 0, 0, 1))
KV
CupertinoProgressbar: color_selected: 1, 0, 0, 1
- color_unselected = [0.7, 0.7, 0.7, 1]
Color of the bar of not yet occurred progress of
CupertinoProgressBar
Python
CupertinoProgressbar(color_unselected=(0.5, 0, 0, 1))
KV
CupertinoProgressbar: color_unselected: 0.5, 0, 0, 1
- on_value(instance, value)
Callback when value of
CupertinoProgressbar
- Parameters
instance – Instance of
CupertinoProgressbar
value – Value of
CupertinoProgressbar
- value = 0
Amount of progress occurred in interval [0, 1] of
CupertinoProgressbar
Python
CupertinoProgressbar(value=50)
KV
CupertinoProgressbar: value: 50
Label
Labels display text to users
- class kivycupertino.uix.label.CupertinoLabel(*args: Any, **kwargs: Any)
iOS style Label
- bold = False
If
text
CupertinoLabel
is boldPython
CupertinoLabel(bold=True)
KV
CupertinoLabel: bold: True
- color = [0, 0, 0, 1]
Color of
text
CupertinoLabel
Python
CupertinoLabel(color=(1, 0, 0, 1))
KV
CupertinoLabel: color: 1, 0, 0, 1
- font_name = 'San Francisco'
Font of
CupertinoLabel
. To comply with iOS standard, use San Francisco or New YorkPython
CupertinoLabel(font_name='New York')
KV
CupertinoLabel: font_name: 'New York'
- font_size = '15sp'
Size of the font of
CupertinoLabel
Python
CupertinoLabel(font_size='20sp')
KV
CupertinoLabel: font_size: '20sp'
- italic = False
If
text
ofCupertinoLabel
is italicPython
CupertinoLabel(italic=True)
KV
CupertinoLabel: italic: True
- text = ' '
A
StringProperty
defining the text ofCupertinoLabel
Python
CupertinoLabel(text='Hello World')
KV
CupertinoLabel: text: 'Hello World'
Modal
Modals help alert users to information
- class kivycupertino.uix.modal.CupertinoActionSheet(*args: Any, **kwargs: Any)
iOS style Action Sheet
- action_height
Height of
CupertinoModalButton
when added toCupertinoActionSheet
Python
CupertinoActionSheet(action_height=75)
KV
CupertinoActionSheet: action_height: 75
- color_normal = [1, 1, 1, 0.9]
Background color of message frame of
CupertinoActionSheet
Python
CupertinoActionSheet(color_normal=(0.5, 0, 0, 1))
KV
CupertinoActionSheet: color_normal: 0.5, 0, 0, 1
- curve
Curve of
CupertinoActionSheet
Python
CupertinoActionSheet(curve=20)
KV
CupertinoActionSheet: curve: 20
- message = ' '
Message shown in message frame of
CupertinoActionSheet
Python
CupertinoActionSheet(message='Hello World')
KV
CupertinoActionSheet: message: 'Hello World'
- spacing
Spacing between
children
ofCupertinoActionSheet
Python
CupertinoActionSheet(spacing=5)
KV
CupertinoActionSheet: spacing: 5
- text_color = [0.6, 0.6, 0.6, 1]
Color of
title
andmessage
shown in message frame ofCupertinoActionSheet
Python
CupertinoActionSheet(text_color=[1, 0, 0, 1])
KV
CupertinoActionSheet: text_color: 1, 0, 0, 1
- title = ' '
Title shown in message frame of
CupertinoActionSheet
Python
CupertinoActionSheet(title='Hello World')
KV
CupertinoActionSheet: title: 'Hello World'
- class kivycupertino.uix.modal.CupertinoDialog(*args: Any, **kwargs: Any)
iOS style dialog that dynamically adapts to the amount of actions (
CupertinoModalButton
) it has- action_height
Height of
CupertinoModalButton
when added toCupertinoDialog
Python
CupertinoDialog(action_height=75)
KV
CupertinoDialog: action_height: 75
- color = [1, 1, 1, 0.9]
Background color of
CupertinoDialog
Python
CupertinoDialog(color=(1, 0, 0, 1))
KV
CupertinoDialog: color: 1, 0, 0, 1
- curve
Curve of
CupertinoDialog
Python
CupertinoDialog(curve=20)
KV
CupertinoDialog: curve: 20
- spacing
Spacing between
children
ofCupertinoDialog
Python
CupertinoDialog(spacing=5)
KV
CupertinoDialog: spacing: 5
- class kivycupertino.uix.modal.CupertinoModalButton(*args: Any, **kwargs: Any)
Adaptive button to be used in Dialogs
- cancel = False
If
CupertinoModalButton
should be a cancel button when added to an instance ofCupertinoActionSheet
Python
CupertinoModalButton(cancel=True)
KV
CupertinoModalButton: cancel: True
- color_disabled = [0.8, 0.8, 0.8, 1]
Background color of
CupertinoModalButton
when disabledPython
CupertinoModalButton(disabled=True, color_disabled=(0.5, 0, 0, 1))
KV
CupertinoModalButton: disabled: True color_disabled: 0.5, 0, 0, 1
- color_down = [0.9, 0.9, 0.9, 0.9]
Background color of
CupertinoModalButton
when pressedPython
CupertinoModalButton(color_down=(0.5, 0, 0, 1))
KV
CupertinoModalButton: color_down: 0.5, 0, 0, 1
- color_normal = [1, 1, 1, 0.9]
Background color of
CupertinoModalButton
when not pressedPython
CupertinoModalButton(color_normal=(0.5, 0, 0, 1))
KV
CupertinoModalButton: color_normal: 0.5, 0, 0, 1
- disabled = False
If
CupertinoModalButton
is disabledPython
CupertinoModalButton(disabled=True)
KV
CupertinoModalButton: disabled: True
- font_size = '14sp'
Size of text of
CupertinoModalButton
Python
CupertinoModalButton(font_size='20sp')
KV
CupertinoModalButton: font_size: '20sp'
- text = ' '
Text of
CupertinoModalButton
Python
CupertinoModalButton(text='Hello World')
KV
CupertinoModalButton: text: 'Hello World'
- text_color = [0.05, 0.5, 1, 1]
Color of the text of
CupertinoModalButton
Python
CupertinoModalButton(text_color=(1, 0, 0, 1))
KV
CupertinoModalButton: text_color: 1, 0, 0, 1
- transition_duration = 0.075
Duration of the transition of the color of
CupertinoButton
when its state changesPython
CupertinoModalButton(transition_duration=0.5)
KV
CupertinoModalButton: transition_duration: 0.5
Page
Pages allow for a separation of different features
- class kivycupertino.uix.page.CupertinoPageControls(*args: Any, **kwargs: Any)
iOS style Page Controls. Will automatically update the number of pages and current page when added to an instance of
CupertinoScreenManager
- background_color = [0, 0, 0, 0]
Background color of
CupertinoPageControls
Python
CupertinoPageControls(background_color=(1, 0, 0, 1))
KV
CupertinoPageControls: background_color: 1, 0, 0, 1
- color_selected = [1, 1, 1, 1]
A
ColorProperty
defining the color of a dot onCupertinoPageControls
when not selectedPython
CupertinoPageControls(color_selected=(1, 0, 0, 1))
KV
CupertinoPageControls: color_selected: 1, 0, 0, 1
- color_unselected = [0.2, 0.2, 0.2, 1]
Color of a dot on
CupertinoPageControls
when not selectedPython
CupertinoPageControls(color_unselected=(0.5, 0, 0, 1))
KV
CupertinoPageControls: color_unselected: 0.5, 0, 0, 1
- on_parent(instance, parent)
Callback when
CupertinoPageControls
is added toCupertinoScreenManager
- Parameters
instance – Instance of class
CupertinoPageControls
parent – Instance of
CupertinoScreenManager
- tap = False
If tapping
CupertinoPageControls
will switch to a screenPython
CupertinoPageControls(tap=True)
KV
CupertinoPageControls: tap: True
- class kivycupertino.uix.page.CupertinoScreenManager(*args: Any, **kwargs: Any)
A Screen Manager widget that also accepts an instance of
CupertinoPageControls
- add_widget(widget, *args, **kwargs)
Callback when a
Screen
or aCupertinoPageControls
is added toCupertinoScreenManager
- Parameters
widget – Widget to be added to
CupertinoScreenManager
Scrollview
ScrollViews help show lots of information within a set screen size
- class kivycupertino.uix.scrollview.CupertinoScrollView(*args: Any, **kwargs: Any)
iOS style ScrollView
- bar_color = [0.65, 0.65, 0.65, 1]
Color of the bar of
CupertinoScrollView
when scrollingPython
CupertinoScrollview(bar_color=(1, 0, 0, 1))
KV
CupertinoScrollview: bar_color: 1, 0, 0, 1
- bar_inactive_color = [0, 0, 0, 0]
Color of the bar of
CupertinoScrollView
when not scrollingPython
CupertinoScrollview(bar_inactive_color=(0.5, 0, 0, 1))
KV
CupertinoScrollview: bar_inactive_color: 0.5, 0, 0, 1
Slider
Sliders allow users to choose values
- class kivycupertino.uix.slider.CupertinoSlider(*args: Any, **kwargs: Any)
iOS style slider
- color_selected = [0, 0.5, 1, 1]
Color of the bar of occurred progress of
CupertinoSlider
Python
CupertinoSlider(color_selected=(1, 0, 0, 1))
KV
CupertinoSlider: color_selected: 1, 0, 0, 1
- color_unselected = [0.7, 0.7, 0.7, 1]
Color of bar of not yet occurred progress of
CupertinoSlider
Python
CupertinoSlider(color_unselected=(0.5, 0, 0, 1))
KV
CupertinoSlider: color_unselected: 0.5, 0, 0, 1
- max = 100
Maximum value of
CupertinoSlider
Python
CupertinoSlider(max=50)
KV
CupertinoSlider: max: 50
- min = 0
Minimum value of
CupertinoSlider
Python
CupertinoSlider(min=-50)
KV
CupertinoSlider: min: -50
- on_touch_move(touch)
Callback when
CupertinoSlider
is dragged- Parameters
touch – Touch on
CupertinoSlider
- tap = True
If tapping
CupertinoSlider
can change itsvalue
Python
CupertinoSlider(tap=True)
KV
CupertinoSlider: tap: True
- thumb_color = [1, 1, 1, 1]
Color of the thumb of
CupertinoSlider
Python
CupertinoSlider(thumb_color=(1, 0, 0, 1))
KV
CupertinoSlider: thumb_color: 1, 0, 0, 1
- value = 0
Value of
CupertinoSlider
Python
CupertinoSlider(value=50)
KV
CupertinoSlider: value: 50
Swipe
Swiping allows users to interact with widgets by using hidden actions
- class kivycupertino.uix.swipe.CupertinoSwipe(*args: Any, **kwargs: Any)
A widget to add swiping functionality to existing Kivy Cupertino widgets
- background_color = [1, 1, 1, 1]
Background color of
CupertinoSwipe
Python
CupertinoSwipe(background_color=(1, 0, 0, 1))
KV
CupertinoSwipe: background_color: 1, 0, 0, 1
- collapse()
Callback to reset
CupertinoSwipe
so no actions are visible
- complete_swipe_duration = 0.5
How long after
CupertinoSwipe
is released until swipe is moved to final position (completely expanded or completely collapsed)Python
CupertinoSwipe(complete_swipe_duration=1)
KV
CupertinoSwipe: complete_swipe_duration: 1
- expand(side)
Callback to completely open a specified side
CupertinoSwipe
- Parameters
side – The side of
CupertinoSwipe
to expand ('left'
or'right'
)
- is_collapsed()
Check if
CupertinoSwipe
is collapsed- Returns
If
CupertinoSwipe
is collapsed
- class kivycupertino.uix.swipe.CupertinoSwipeAction(*args: Any, **kwargs: Any)
An iOS style action to add to
CupertinoSwipe
- color_disabled = [0, 0.3, 0.4, 1]
Color of
CupertinoSwipeAction
when disabledPython
CupertinoSwipeAction(disabled=True, color_disabled=(0.5, 0, 0, 1))
KV
CupertinoSwipeAction: disabled: True color_disabled: 0.5, 0, 0, 1
- color_normal = [1, 0, 0, 1]
Color of
CupertinoSwipeAction
when not pressed or disabledPython
CupertinoSwipeAction(color_normal=(1, 0, 0, 1))
KV
CupertinoSwipeAction: color_normal: 1, 0, 0, 1
- disabled = False
If
CupertinoSwipeAction
is disabledPython
CupertinoSwipeAction(disabled=True)
KV
CupertinoSwipeAction: disabled: True
- side = 'left'
Side of
CupertinoSwipe
thatCupertinoSwipeAction
should be shown onPython
CupertinoSwipeAction(side='right')
KV
CupertinoSwipeAction: side: 'right'
- symbol = ' '
Text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(symbol='trash_fill')
KV
CupertinoSwipeAction: symbol: 'trash_fill'
- text = ' '
Text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(text='Delete')
KV
CupertinoSwipeAction: text: 'Delete'
- text_color = [1, 1, 1, 1]
Color of text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(text_color=(1, 0, 0, 1))
KV
CupertinoSwipeAction: text_color: 1, 0, 0, 1
Switch
Switches allow users to toggle options
- class kivycupertino.uix.switch.CupertinoSwitch(*args: Any, **kwargs: Any)
iOS style Switch. To comply with iOS standard, keep the width to height ratio of
CupertinoSwitch
at 1:0.6- color_toggled = [0.3, 0.85, 0.4, 1]
Background color of
CupertinoSwitch
when onPython
CupertinoSwitch(color_toggled=(1, 0, 0, 1))
KV
CupertinoSwitch: color_toggled: 1, 0, 0, 1
- color_untoggled = [0.85, 0.85, 0.85, 1]
Background color of
CupertinoSwitch
when offPython
CupertinoSwitch(color_untoggled=(0.5, 0, 0, 1))
KV
CupertinoSwitch: color_untoggled: 0.5, 0, 0, 1
- on_toggled(instance, state)
Callback when state of
CupertinoSwitch
is changed- Parameters
instance – Instance of
CupertinoSwitch
state – If
CupertinoSwitch
is toggled
- on_touch_move(touch)
Callback when
CupertinoSwitch
is dragged- Parameters
touch –
MouseMotionEvent
detected onCupertinoSwitch
- switch_duration = 0.1
Duration of color change and thumb movement when state of
CupertinoSwitch
is changedPython
CupertinoSwitch(switch_duration=0.5)
KV
CupertinoSwitch: switch_duration: 0.5
- thumb_color = [1, 1, 1, 1]
Color of thumb of
CupertinoSwitch
Python
CupertinoSwitch(thumb_color=(1, 0, 0, 1))
KV
CupertinoSwitch: thumb_color: 1, 0, 0, 1
- thumb_padding
Amount of padding around thumb of
CupertinoSwitch
in interval [0, 1] as a percentage of theheight
ofCupertinoSwitch
Python
CupertinoSwitch(thumb_padding=0.1)
KV
CupertinoSwitch: thumb_padding: 0.1
- toggled = False
If
CupertinoSwitch
is onPython
CupertinoSwitch(toggled=True)
KV
CupertinoSwitch: toggled: True
Symbol
Symbols help portray an action with a simple symbol. To view all symbols in Kivy Cupertino,
visit Framework7 or run the Symbols program
- class kivycupertino.uix.symbol.CupertinoSymbol(*args: Any, **kwargs: Any)
Display an iOS style symbol.
- color = [0, 0, 0, 1]
Color of
CupertinoSymbol
Python
CupertinoSymbol(color=(1, 0, 0, 1))
KV
CupertinoSymbol: color: 1, 0, 0, 1
- on_symbol(instance, symbol)
Callback when symbol of
CupertinoSymbol
is changed- Parameters
instance – Instance of
CupertinoSymbol
symbol – Symbol to be displayed
- symbol = ' '
Symbol to be displayed by
CupertinoSymbol
.Python
CupertinoSymbol(symbol='alarm_fill')
KV
CupertinoSymbol: symbol: 'alarm_fill'
Table
Tables help organize data and information for users to view and interact with
- class kivycupertino.uix.table.CupertinoClickableTableCell(*args: Any, **kwargs: Any)
iOS style clickable Cell for Table View.
CupertinoClickableTableCell
is aRelativeLayout
and can accept any number of widgets- color_disabled = [0.8, 0.8, 0.8, 1]
Background color of
CupertinoClickableTableCell
when disabledPython
CupertinoTableCell(disabled=True, color_disabled=(0.5, 0, 0, 1))
KV
CupertinoClickableTableCell: disabled: True color_disabled: 0.5, 0, 0, 1
- color_down = [0.9, 0.9, 0.9, 0.9]
Background color of
CupertinoClickableTableCell
when pressedPython
CupertinoClickableTableCell(color_down=(0.5, 0, 0, 1))
KV
CupertinoClickableTableCell: color_down: 0.5, 0, 0, 1
- color_normal = [1, 1, 1, 1]
Background color of
CupertinoClickableTableCell
when not pressed or disabledPython
CupertinoClickableTableCell(color_normal=(1, 0, 0, 1))
KV
CupertinoClickableTableCell: color_normal: 1, 0, 0, 1
- disabled = False
If
CupertinoClickableTableCell
is disabledPython
CupertinoClickableTableCell(disabled=True)
KV
CupertinoClickableTableCell: disabled: True
- transition_duration = 0.075
Duration of the transition of the color of
CupertinoButton
when its state changesPython
CupertinoClickableTableCell(transition_duration=0.5)
KV
CupertinoClickableTableCell: transition_duration: 0.5
- class kivycupertino.uix.table.CupertinoTableCell(*args: Any, **kwargs: Any)
iOS style Cell for Table View.
CupertinoTableCell
is aRelativeLayout
and can accept any number of widgets- color = [1, 1, 1, 1]
Background color of
CupertinoTableCell
Python
CupertinoTableCell(color=(1, 0, 0, 1))
KV
CupertinoNavigationBar: CupertinoTableCell: 1, 0, 0, 1
- class kivycupertino.uix.table.CupertinoTableGroup(*args: Any, **kwargs: Any)
iOS style table group
- add_widget(widget, index=0, canvas=None)
Add an instance of
CupertinoTableCell
toCupertinoTableGroup
- Parameters
widget – Instance of
CupertinoTableCell
to be added toCupertinoTableGroup
index – Index at which
CupertinoTableCell
will be inserted intochildren
ofCupertinoTableGroup
canvas – Canvas at which
CupertinoTableCell
will be inserted intoCupertinoTableGroup
- text = ' '
Background color of
CupertinoClickableTableCell
when disabledPython
CupertinoTableGroup(text='Example Group')
KV
CupertinoTableGroup: text: 'Example Group'
- text_color = [0.6, 0.6, 0.6, 1]
Background color of
CupertinoClickableTableCell
when disabledPython
CupertinoTableGroup(text_color=(1, 0, 0, 1))
KV
CupertinoTableGroup: text_color: 1, 0, 0, 1
Textinput
Text fields allow users to enter input
- class kivycupertino.uix.textinput.CupertinoSearchBar(*args: Any, **kwargs: Any)
iOS style search bar
- background_color = [0.85, 0.85, 0.85, 0.7]
Background color of
CupertinoSearchBar
Python
CupertinoSearchBar(background_color=(1, 0, 0, 1))
KV
CupertinoSearchBar: background_color: 1, 0, 0, 1
- color_down = [0.4, 0.4, 0.4, 1]
Color of the clear button of
CupertinoSearchBar
when pressedPython
CupertinoSearchBar(color_down=(0.5, 0, 0, 1))
KV
CupertinoSearchBar: color_down: 0.5, 0, 0, 1
- cursor_color = [0.25, 0.5, 0.95, 1]
Color of cursor of
CupertinoTextView
Python
CupertinoSearchBar(background_color=(0.5, 0, 0, 1))
KV
CupertinoSearchBar: background_color: 0.5, 0, 0, 1
- foreground_color = [0, 0, 0, 1]
Text color of
CupertinoSearchBar
Python
CupertinoSearchBar(foreground_color=(1, 0, 0, 1))
KV
CupertinoSearchBar: foreground_color: 1, 0, 0, 1
- hint_text = 'Search'
Text of hint of
CupertinoTextField
Python
CupertinoSearchBar(hint_text='Hello World')
KV
CupertinoSearchBar: hint_text: 'Hello World'
- symbol_color = [0.55, 0.55, 0.6, 1]
Color of the symbols of
CupertinoSearchBar
Python
CupertinoSearchBar(symbol_color=(1, 0, 0, 1))
KV
CupertinoSearchBar: symbol_color: 1, 0, 0, 1
- text = ''
Text of
CupertinoTextField
Python
CupertinoSearchBar(text='Hello World')
KV
CupertinoSearchBar: text: 'Hello World'
- class kivycupertino.uix.textinput.CupertinoTextField(*args: Any, **kwargs: Any)
iOS style Text Field to be used for single-line input
- background_color = [0, 0, 0, 0]
Background color of
CupertinoTextField
Python
CupertinoTextField(background_color=(0.5, 0, 0, 1))
KV
CupertinoTextField: background_color: 0.5, 0, 0, 1
- cursor_color = [0.25, 0.5, 0.95, 1]
Color of cursor of
CupertinoTextField
Python
CupertinoTextField(cursor_color=(1, 0, 0, 1))
KV
CupertinoTextField: cursor_color: 1, 0, 0, 1
- foreground_color = [0, 0, 0, 1]
Text color of
CupertinoTextField
Python
CupertinoTextField(foreground_color=(1, 0, 0, 1))
KV
CupertinoTextField: foreground_color: 1, 0, 0, 1
- hint_text = ''
Text of hint of
CupertinoTextField
Python
CupertinoTextField(hint_text='Hello World')
KV
CupertinoTextField: hint_text: 'Hello World'
- class kivycupertino.uix.textinput.CupertinoTextView(*args: Any, **kwargs: Any)
iOS style Text View for multiline input
- background_color = [0, 0, 0, 0]
Background color of
CupertinoTextView
Python
CupertinoTextField(background_color=(0.5, 0, 0, 1))
KV
CupertinoTextField: background_color: 0.5, 0, 0, 1
- cursor_color = [0.25, 0.5, 0.95, 1]
Color of cursor of
CupertinoTextView
Python
CupertinoTextView(background_color=(0.5, 0, 0, 1))
KV
CupertinoTextView: background_color: 0.5, 0, 0, 1
- foreground_color = [0, 0, 0, 1]
Text color of
CupertinoTextView
Python
CupertinoTextField(foreground_color=(1, 0, 0, 1))
KV
CupertinoTextField: foreground_color: 1, 0, 0, 1
Contributing
To help improve this project, fork our repository and install Kivy Cupertino with the dev
extra:
$ pip install kivycupertino[dev]
Visit the projects page to view pending projects you may be able to work on
License
Kivy Cupertino is licensed under the MIT license
Copyright (c) 2021 cmdvmd
Portions Copyright (c) 2021 arnavs-0
Copyright (c) 2010-2020 Kivy Team and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.