I am making an animation movie in Pythonista, which is to be recorded and distributed.
Of course, I use Scene for this purpose. But, there is always the stop-cross in the upper left hand corner visible.
Is there a way to hide this unwanted cross?
Forum Archive
Is it possible to hide the 'Stop' cross in the upper lefthand corner?
upwart
Jan 31, 2015 - 21:39
omz
Jan 31, 2015 - 21:39
You could run the scene with a SceneView, and present it using the hide_title_bar option.
Here's a short example with a scene that just draws a green background:
from scene import *
class MyScene (Scene):
def draw(self):
background(0, 0, 1)
view = SceneView()
view.scene = MyScene()
view.present('fullscreen', hide_title_bar=True)
(swipe down with two fingers to close the view)
There's currently no way to hide the status bar (time, battery...) though.
chrislandau203
Nov 26, 2016 - 05:27
This is definitely not working in the recent implementation of Pythonista. Any new ideas for how to solve this? I want to remove the X for the full screen app I'm building.
abcabc
Nov 26, 2016 - 07:13
Discussed here
https://forum.omz-software.com/topic/3306/disable-on-screen-printing-in-scene-
Now with objc_util it is possible to hide status bar(battery, time etc)
import scene, ui
from objc_util import UIApplication
def close_view():
v.close()
class MyScene(scene.Scene):
def setup(self):
self.test_label = scene.LabelNode('Test hide title bar',
position=self.size/2.0, parent=self)
self.close_label = scene.LabelNode('Close view',
position=(self.size[0]/2, self.size[1]/2-100),
parent=self)
def touch_began(self, touch):
if touch.location in self.close_label.frame:
close_view()
w, h = ui.get_window_size()
frame = (0, 0, w, h)
v = ui.View(frame=frame)
scene_view = scene.SceneView(frame=frame)
scene_view.flex= 'WH'
scene_view.scene = MyScene()
v.add_subview(scene_view)
v.present('fullscreen', hide_title_bar=True)
UIApplication.sharedApplication().statusBar().hidden = True
robnee
Dec 03, 2016 - 17:25
def hide_close(self, state=True):
from objc_util import ObjCInstance
v = ObjCInstance(self.view)
for x in v.subviews():
#if 'UIButton' in x.description():
if str(x.description()).find('UIButton') >= 0:
x.setHidden(state)
This works better for me.