This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Sidebar UI -- close programmatically
Helgi last edited by
I've stumbled upon a nice sidebar UI script made to work together with the Working Copy app.
The script presents a very narrow sidebar with just one column of buttons. As it turns out, for a sidebar that narrow, the close button overlaps with the 'open console' chevron, so it's impossible to close the sidebar. Is it a known issue?
To circumvent this, I wanted to add a custom 'close' button that calls
close()on the view. However, it looks like
close()doesn't work for sidebars (it works OK for me for sheets, fullscreens and popovers). Is it a known issue? I wasn't able to find anything stating this in the docs.
If I succeed with adding a custom close button, I'd like to hide the standard close button on the sidebar (which is not usable anyway). Is there any way I can do this?
hide_title_bardoesn't work for me.
I believe this questions are not covered on the forum, at least I wasn't able to find anything like them.
Tested with Pythonista 1.5.
dgelessus last edited by
Sidebar and panel mode views cannot be closed programmatically, this is a known bug/limitation. A workaround could be to present an empty view with the same mode, which would at least make the X button usable again, but that of course still requires extra user interaction.
JonB last edited by
As a hack, you can set the frame to 0,0,0,0 and present as a sidebar again. This has some unfortunate behavior of returning
on_screenas True, but otherwise seems to hide the view.