Author Topic: UIScrollView - Momentum Amount issue  (Read 3063 times)

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
UIScrollView - Momentum Amount issue
« on: July 13, 2015, 05:29:09 AM »
Hi guys , i have an problem with my scrollview ,  when i drag my scrollview and instantly closing the dialog and when i opening it for second time -- my draggable panel appears from top or bottom side with animation.

Here is my scrollView settings screenshot
https://drive.google.com/open?id=0B1O4UaOdJxl0UjhlQTRYdFVPM2M

Question! -- how can i disable that appearing functionality from my scrollview?

Thanks a lot.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView - Momentum Amount issue
« Reply #1 on: July 14, 2015, 11:49:10 PM »
Sorry, I don't understand what you are asking here. Your linked screenshot is also private, so no one except you can see it.

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: UIScrollView - Momentum Amount issue
« Reply #2 on: July 15, 2015, 03:43:57 AM »
Sorry about that.
https://drive.google.com/file/d/0B1O4UaOdJxl0NWRoa0lrdTVkcU0/view?usp=sharing

Here is my link with issue and  i have attached my UIScrollView settings image .
My question is - how can i disable animation of scroll view , which appears from bottom?

Thanks in advance. 
« Last Edit: July 16, 2015, 05:04:31 AM by doncarlos91 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView - Momentum Amount issue
« Reply #3 on: July 16, 2015, 10:42:07 AM »
If you want to prevent the ability to drag past the scroll view's bounds, the drag effect needs to not be "spring". If you want the scroll view to reset its position to the top when it's opened, create a script that has an OnEnable function, and inside call UIScrollView's ResetPosition.

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: UIScrollView - Momentum Amount issue
« Reply #4 on: July 16, 2015, 11:09:27 AM »
Thanks for answer, i`ve tried  to call ResetPosition in onEnable method, but it`s still appearing with SpringAnimation :(


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView - Momentum Amount issue
« Reply #5 on: July 16, 2015, 11:18:54 AM »
So GetComponent<SpringAnimation>() and destroy it. ;)