Hi,I want to click my "close" button to close the view in Pythonista Keyboard,but it’s not work.What's wrong with the following code?Thanks.
import ui
import keyboard
def close(sender):
sender.superview.close()
w, h = ui.get_screen_size()
h = h - 64
view = ui.View(name = 'View', frame = (0,0,w,h))
bt1 = ui.Button(name = 'button1', frame =(10, 10, 80, 80), title='Close', action=close)
view.add_subview(bt1)
if keyboard.is_keyboard():
keyboard.set_view(view)
