Author Topic: scrollview : how to identify which item is selected  (Read 2912 times)

ciaravoh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
scrollview : how to identify which item is selected
« on: February 12, 2014, 05:34:41 PM »
Hello,

I have a scroll view with some items, centered. I need to know which Item is selected. How should I perform this ?

thank you.

Hervé

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: scrollview : how to identify which item is selected
« Reply #1 on: February 13, 2014, 12:38:51 AM »
UICenterOnChild.centeredObject tells you just that, if you're actually using that script. If not, then you need to do some math -- and I would recommend looking inside UICenterOnChild.Recenter function, as it performs that math inside.

ciaravoh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: scrollview : how to identify which item is selected
« Reply #2 on: February 13, 2014, 06:18:08 AM »
Thank you. I will give it a try.
Regards,
Hervé