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.


    Programmatically controlling the scrollview same as touch

    Pythonista
    scrollview
    2
    4
    2854
    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.
    • Phuket2
      Phuket2 last edited by

      Does anyone know if it's possible to programmatically control the scrollview's scrolling in the same way you can do with your finger. If possible it could provide some very nice animation effects as well as making it quite easy to make games like a slot machine.

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

        @omz, appears not many questions here for you tonight :) if you have time do you have a comment about this question? In my own stupid way, I think it's a smart question.

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

          I can't think of a good way to do that. You could theoretically use ui.delay(), and set the content_offset there somehow, but a) the performance likely wouldn't be very good, and b) you'd need to calculate the deceleration etc. manually, which is somewhat difficult, especially if you'd want to replicate the bouncing effect...

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

            Fair enough. But I think it's something to watch out while you are playing in your box of goodies. Is a great effect. Could be used in so many ways. I could make a poker machine in about 10mins with that sort of effect. I could also make ui.Views appear and disappear in a variety of ways with that functionality. But, I am sure you are right, doing it with ui.delay would not cut it.

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