Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mucylulu

Pages: [1]
1
I got the same problem too,my solution is below:
  1. private UIScrollView scrollView;
  2.     private Vector3 startPos = Vector3.zero;
  3.     private void dragFinished()
  4.     {
  5.         if (scrollView != null)
  6.         {
  7.             if (!scrollView.shouldMoveVertically)
  8.             {
  9.  
  10.                 if (scrollView.dragEffect == UIScrollView.DragEffect.MomentumAndSpring)
  11.                 {
  12.                     // Spring back into place
  13.                     SpringPanel.Begin(scrollView.GetComponent<UIPanel>().gameObject, startPos, 13f).strength = 8f;
  14.                 }
  15.  
  16.             }
  17.         }
  18.         else
  19.         {
  20.             Debug.Log("grid or scroll view is null FUNC:dragFinished POS:PackageTypeClick.cs");
  21.         }
  22.     }
  23.  
  24.     private void dragStart()
  25.     {
  26.         scrollView = CurrentScrollView.GetComponent<UIScrollView>();
  27.         startPos = scrollView.gameObject.transform.localPosition;
  28.        
  29.     }
  30.  

 ;D ;D ;Dit's works well

Pages: [1]