jcavar / refresher

DEPRECATED: Pull to refresh in Swift
MIT License
873 stars 99 forks source link

Where to put custom load data code? #18

Closed rustanacexd closed 9 years ago

rustanacexd commented 9 years ago

Where to put custom load/grab data code?

tableView.addPullToRefreshWithAction({
            NSOperationQueue().addOperationWithBlock {
                sleep(2)
                NSOperationQueue.mainQueue().addOperationWithBlock {
                    self.tableView.stopPullToRefresh()
                }
            }
        }, withAnimator: PacmanAnimator())

Is it inside the mainQueue or outside?

jcavar commented 9 years ago

Just replace sleep with your custom code

rustanacexd commented 9 years ago

ahh I see. ok thanks a lot!

jcavar commented 9 years ago

You are welcome :)