Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

Loader Not Stopping #4

Open
saadupwork opened this issue Feb 27, 2020 · 0 comments
Open

Loader Not Stopping #4

saadupwork opened this issue Feb 27, 2020 · 0 comments

Comments

@saadupwork
Copy link

Hi,

I am using your pull to refresh extension.
When I pull its not going back to its original place. Loader keeps loading.

NavigationView{
            List{

 ForEach(0..<self.dataSource.myModel.count, id: \.self){ index in
                    SelectionCell(title: self.dataSource.myModel[index].titles, date: self.dataSource.myModel[index].startDates, phoneNumber: "", message: self.dataSource.myModel[index].titles, selectedItem: self.$selectedItem, beforetext: self.$beforetext, aftertext: self.$aftertext, showtitle: self.$showtitle)
                }

 .onPull(perform: {
                
                print("isLoading OnPull is : \(self.isLoading)")
                self.isLoading = false
                DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
                    self.dataSource.myModel = []
                    self.dataSource.getCalendarEvents()
                    //self.dataSource.sortModelWithRespectToDate()
                    self.isLoading = true
                }
            }, isLoading: self.isLoading)
                
                
                .navigationBarTitle("AGENDA")
                .navigationBarHidden(false)

}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant