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.


    ui.View.present('sheet') will probably be too small in Pythonista v2

    Pythonista
    3
    3
    2536
    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.
    • ccc
      ccc last edited by ccc

      If your script does view.present('sheet') you might find that your view is too small in Pythonista v2.

      One possible fix would be to size your view prior to presenting it.

      view.width = view.height = min(ui.get_screen_size())
      view.present('sheet')
      
      1 Reply Last reply Reply Quote 3
      • Killwas
        Killwas last edited by

        This happened to me when I used ui .View.present(self, sheet') in ui.View._init_().

        def __init__(self):
                # ...
                self.present('sheet')
        

        At this time the UI elements are not initialized and the size is 100 x 100. I moved it to ui.View.did_load(self) and it worked out alright.

        def did_load(self):
                # ...
                self.present('sheet')
        

        Thanks to the wonderful debugger in pythonista 3!

        1 Reply Last reply Reply Quote 1
        • jurtly
          jurtly last edited by

          This be the answer. Thank you guys very much for questioning, and answering.

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