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

../_images/demo15.gif
background_color = [1, 1, 1, 1]

Background color of CupertinoSwipe

../_images/background_color3.png

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

../_images/collapse.gif
complete_swipe_duration = 0.5

How long after CupertinoSwipe is released until swipe is moved to final position (completely expanded or completely collapsed)

../_images/complete_swipe_duration.gif

Python

CupertinoSwipe(complete_swipe_duration=1)

KV

CupertinoSwipe:
    complete_swipe_duration: 1
expand(side)

Callback to completely open a specified side CupertinoSwipe

../_images/expand.gif
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

../_images/demo4.png
color_disabled = [0, 0.3, 0.4, 1]

Color of CupertinoSwipeAction when disabled

../_images/color_disabled5.png

Python

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 disabled

../_images/color_normal6.png

Python

CupertinoSwipeAction(color_normal=(1, 0, 0, 1))

KV

CupertinoSwipeAction:
    color_normal: 1, 0, 0, 1
disabled = False

If CupertinoSwipeAction is disabled

../_images/disabled4.png

Python

CupertinoSwipeAction(disabled=True)

KV

CupertinoSwipeAction:
    disabled: True
side = 'left'

Side of CupertinoSwipe that CupertinoSwipeAction should be shown on

../_images/side.png

Python

CupertinoSwipeAction(side='right')

KV

CupertinoSwipeAction:
    side: 'right'
symbol = ' '

Text of CupertinoSwipeAction

../_images/symbol2.png

Python

CupertinoSwipeAction(symbol='trash_fill')

KV

CupertinoSwipeAction:
    symbol: 'trash_fill'
text = ' '

Text of CupertinoSwipeAction

../_images/text5.png

Python

CupertinoSwipeAction(text='Delete')

KV

CupertinoSwipeAction:
    text: 'Delete'
text_color = [1, 1, 1, 1]

Color of text of CupertinoSwipeAction

../_images/text_color4.png

Python

CupertinoSwipeAction(text_color=(1, 0, 0, 1))

KV

CupertinoSwipeAction:
    text_color: 1, 0, 0, 1