How can I set an specific Delegate to a ListView instance?


#1

Hi community I’m trying to set an specific delegate to a ListView instance but it does nothing :confused:

let Delegate = NSObject.extend({
  scrollViewDidScroll: (scrollView) => {
    console.log('scrollViewDidScroll')
    console.log(scrollView)
  },
  scrollViewWillBeginDragging: (scrollView) => {
    console.log('scrollViewWillBeginDragging')
    console.log(scrollView)
  },
  scrollViewWillEndDraggingWithVelocityTargetContentOffset: (scrollView, velocity, targetContentOffset) => {
    console.log('scrollViewWillEndDragging');
    console.log(scrollView);
  },
  scrollViewDidEndDraggingWillDecelerate: (scrollView, decelerate) => {
    console.log('scrollViewDidEndDragging')
    console.log(scrollView)
  },
  scrollViewShouldScrollToTop: (scrollView) => {
    console.log('scrollViewShouldScrollToTop')
    console.log(scrollView)
  },
  scrollViewDidScrollToTop: (scrollView) => {
    console.log('scrollViewDidScrollToTop')
    console.log(scrollView)
  },
  scrollViewWillBeginDecelerating: (scrollView) => {
    console.log('scrollViewWillBeginDecelerating')
    console.log(scrollView)
  },
  scrollViewDidEndDecelerating: (scrollView) => {
    console.log('scrollViewDidEndDecelerating')
    console.log(scrollView)
  }
}, {
  protocols: [UITableViewDelegate]
});

let delegate = Delegate.alloc().init();

this.presentationsListView.nativeElement.ios.delegate = delegate;

UITableViewDelegate inherits from UIScrollViewDelegate

Am I missing something?

Thanks in advance!


#2

Hi @delgadillojuan,

Any luck on this yet?
At the moment we are also stuck on getting scroll events from the list-view.

Regards,

Jasper