Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Monotouch - detect scrolls events and first visible row in screen
posted

Hi,

It's possible to detect the events:

- scroll beginning?

- scroll ends?

 

And can i detect the first visible row of the grid in screen/view?

 

thanks for the help.

 

Parents
No Data
Reply
  • 40030
    Verified Answer
    Offline posted

    Hi, 

    The IGGridView actually derives from UIScrollView, and as such it's delegate derives from UIScrollViewDelegate. This means that you get all of the base class logic as well, which in the case of MonoTouch, means that you get the scroll events: 

    http://iosapi.xamarin.com/?link=T%3aMonoTouch.UIKit.UIScrollView%2fE

    You can read about the order of events and what triggers them in this article, in the "Event Sequence" section:

    http://iosapi.xamarin.com/?link=T%3aMonoTouch.UIKit.UIScrollView

    As for detecting if a cell is in view, you can use the following code:

    IGGridViewCell cell = _gridView.ResolveCellForPath (new IGCellPath(0,0,0)) as IGGridViewCell;
                if(cell != null)
                {
                    // Cell is Visible
                }

    Hope this helps, 

    -SteveZ

Children