Nativescript-ui-feedback: RadListView PullToRefresh not working on iOS

Created on 29 Aug 2017  路  5Comments  路  Source: ProgressNS/nativescript-ui-feedback

Hi,
I'm using a RadListView with PullToRefresh enabled. Here is a small code sample which works fine on Android:

public onPullToRefreshInitiated(args: ListViewEventData) {
        this.refreshInitiated.emit(); // this changes the items source
        let listview = args.object as RadListView;
        listview.notifyPullToRefreshFinished();
   }

However, on iOS when the list is pulled, after it refreshes there is an empty space at the top of the list (about 2cm) and the list becomes completely unscrollable (also the pull to refresh cannot be triggered again by pulling).

Is this a known issue?
Thanks,

These are the versions I'm using:
Angular
iOS 10.3
Progress NativeScript UI version: "3.1.0-2017-7-31-6",
CLI: 3.1.1
Cross-platform modules: 3.1.0
Runtime(s): 3.1.1

Most helpful comment

Can you try wrapping listview.notifyPullToRefreshFinished(); in a little setTimeout?

All 5 comments

Can you try wrapping listview.notifyPullToRefreshFinished(); in a little setTimeout?

Thanks!! It solved the issue.

Thanks alot @EddyVerbruggen this solved my issue

          setTimeout(()=>{
            listView.notifyPullToRefreshFinished();
        },500)

It's old post but same problem 2 years after. Maybe it has something with new iOS.
I can't see spinner on iOS and ListView bounce down 1-2cm. Solution for bounce problem is adding margin via class only for iOS:
pullToRefresh="true" pullToRefreshInitiated="refreshList" class="ios-pull-margin"
And than use this in app.ios.scss:

.ios-pull-margin {
   margin-top: 0.001;
}

I still can't see spinning animation but refresh works fine. I may add different animation on top just to simulate it in the View.

As a work around you can use scrollToIndex(0, true) on the RadListView
or better scrollWithAmount(-listView.getScrollOffset(), true); in case you have a header

Was this page helpful?
0 / 5 - 0 ratings