GithubHelp home page GithubHelp logo

refreshui's Introduction

RefreshUI is no longer available. I'm preferred to use Introspect. https://github.com/siteline/SwiftUI-Introspect

RefreshUI

RefreshUI provide native refresh control to SwiftUI.

⚠️ This library uses blackmagic.🧞‍♂️

iOS macOS

Usage

List {
    ForEach(items, id: \.self) { (item) in
        Text("\(item)")
    }
}.onPull(perform: {
    self.items.shuffle()
}, isLoading: isLoading)

License

RefreshUI is licensed under the MIT License. See the LICENSE file for more information.

refreshui's People

Contributors

noppefoxwolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

refreshui's Issues

Loader Not Stopping

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)

}

Multiple List Error

If there are multiple lists in the same VStack, Rotoscope can't find table view with tag.

Example:

VStack {
List {

}.onPull()

List {

}.onPull()
}

Blank screen on Live Preview

As title, I believe this is a known issue.
As soon as I commented out .onPull(), LivePreview works again.

I would also like to thank you for the effort and sharing.
Other solutions available out there are not even close to native pull-to-refresh UX like yours.

Programmatic Refresh

Have you considered adding some functionality to allow programmatic call to refresh??

extension UIRefreshControl {
    func programaticallyBeginRefreshing(in tableView: UITableView) {
        beginRefreshing()
        let offsetPoint = CGPoint.init(x: 0, y: -frame.size.height)
        tableView.setContentOffset(offsetPoint, animated: true)        
    }
}

Question

Hi,

  • What is the purpose of tagging, how is it working and why ?
  • And what isToken(id: 1), it will be always the same...

Hope you could clarify how it works :)

@noppefoxwolf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.