Author Topic: UIScrollView top/bottom distance  (Read 7502 times)

Wahooney

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
    • View Profile
UIScrollView top/bottom distance
« on: January 29, 2014, 08:15:04 AM »
Is there an quick and easy way of getting the distance the current scroll view can scroll up and down?

Preferably in a way where topScrollDistance + bottomScrollDistance == 1.0f || 0.0f

topDistance in units, bottomDistance in units and totalScrollableDistance in units would be great too!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView top/bottom distance
« Reply #1 on: January 29, 2014, 08:48:20 AM »
Quick and dirty... not quite. But look inside UIScrollView.UpdateScrollbars -- it does that logic there.

Wahooney

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
    • View Profile
Re: UIScrollView top/bottom distance
« Reply #2 on: January 30, 2014, 03:26:38 AM »
Thanks! I'll have a look :D