Quantcast
Viewing all articles
Browse latest Browse all 91519

PullToRefresh not working in iOS

I have implemented PullToRefresh functionality on Xamarin.Forms which is working well on WP and Android but not iOS.
In iOS Pulling the list down does show a loading spinner but the refresh Command does not get called. Plz tell me why it is not working on iOS. I am using Xamarin.Forms version="1.4.2.6359".
Here're code snippets:

private bool isBusy;
public bool IsBusy
{
    get { return isBusy; }
    set
    {
    if (isBusy == value)
        return;

    isBusy = value;
    OnPropertyChanged("IsBusy");
    }
}
private Command loadCommand;

public Command LoadTagsCommand
{
    get
    {
    return loadCommand ?? (loadCommand = new Command(ExecuteLoadTagsCommand, () =>
    {
        return !IsBusy;
    }));
    }
}

private async void ExecuteLoadTagsCommand()
{
    IsBusy = true;
    //DoStuff
    await LoadInfo(false);
    IsBusy = false;

}

And listView config:

     listView.ItemSelected += listView_ItemSelected;
                listView.IsPullToRefreshEnabled = true;
                listView.HasUnevenRows = true;
                listView.RefreshCommand = LoadTagsCommand;
                listView.BindingContext = this;
                listView.SetBinding(ListView.IsRefreshingProperty, "IsBusy");

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>