V
V
Viktor Paperno2015-01-29 01:19:21
Python
Viktor Paperno, 2015-01-29 01:19:21

How to implement communication with UI in Pythonista?

Working with Pythonista , I can't figure out GUI implementations with UI Designer . It is necessary to implement the launch of two functions by clicking on two different buttons and displaying an image.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Myshov, 2015-02-05
@Myshov

Here it is without ui designer:
# coding: utf-8
import ui
def button_tapped(sender):
sender.title = 'Hello'
view = ui.View()
view.name = 'Demo'
view.background_color = 'white'
button = ui .Button(title='Tap me!')
button.center = (50, 25)
button.flex = 'LRTB'
button.action = button_tapped
button.background_color = 'green'
view.add_subview(button)
view.present(' sheet')
There is good documentation for ui designer
omz-software.com/pythonista/docs/ios/ui.html#using...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question