omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    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.


    Sceneview is frozen when presenting another UI View

    Pythonista
    4
    8
    5499
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Shambhala
      Shambhala last edited by

      When I present a different UI View over a SceneView, the scene becomes frozen and unresponsive. How do I resume the scene?

      1 Reply Last reply Reply Quote 0
      • Shambhala
        Shambhala last edited by

        Here is a simple example to show what I mean: https://gist.github.com/5a762c22d4f4037a8f0e

        1 Reply Last reply Reply Quote 0
        • brumm
          brumm last edited by

          scene.resume() should do the job, but I had no luck...

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            When using Scene without the UI module, Scene.resume() is a method that you write which will be automatically called by the system when your scene should resume.

            However, when using SceneView to mix both Scene and UI together, the Scene.resume() trick no longer works. For details, see: http://omz-software.com/pythonista/docs/ios/scene.html#integration-with-the-ui-module

            You might want to examine the behavior of the boolean variable SceneView.paused to see if that helps in any way.

            1 Reply Last reply Reply Quote 0
            • Shambhala
              Shambhala last edited by

              I'm not having any luck setting SceneView.paused to False. I need some kind of workaround

              1 Reply Last reply Reply Quote 0
              • JonB
                JonB last edited by

                Unless you are using popover, you don't ever want to present another view. Pretty sure it kills the scene thread.

                alternatives are to use a navigationview and push a new view onto it, use a popover, or add the other view as a subview to your root, and bring to front.

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  I put an alternate formulation as a comment on the gist: https://gist.github.com/5a762c22d4f4037a8f0e

                  The trick is to replace the scene but not replace the view. I numbered the scenes so you can see that the scene is replaced each time you click the bottom of the screen. This gives you functionality like what we used to have in MultiScenes.

                  1 Reply Last reply Reply Quote 0
                  • Shambhala
                    Shambhala last edited by

                    Adding it as a subview and bringing it to the front ALMOST works.

                    Each time I close the view by swiping down with 2 fingers, it shifts downward a little bit. So the next time it opens, everything is slightly farther down than it was before. How can I fix this small bug?

                    EDIT: Nevermind, that only happened with ScrollView() not View()

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB Forums | Contributors