Skip to content

Commit

Permalink
updated example
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuchetics committed Sep 26, 2018
1 parent 26ccc34 commit 84a7eaa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ class ViewController: UIViewController, StatefulViewController {
// Fake network call
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(3 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)) {
// Success
// self.dataArray = ["Merlot", "Sauvignon Blanc", "Blaufränkisch", "Pinot Nior"]
// self.tableView.reloadData()
// self.endLoading(error: nil, completion: {
// print("completion endLoading -> loadingState: \(self.currentState.rawValue)")
// })
// print("endLoading -> loadingState: \(self.lastState.rawValue)")
self.dataArray = ["Merlot", "Sauvignon Blanc", "Blaufränkisch", "Pinot Nior"]
self.tableView.reloadData()
self.endLoading(error: nil, completion: {
print("completion endLoading -> loadingState: \(self.currentState.rawValue)")
})
print("endLoading -> loadingState: \(self.lastState.rawValue)")

// Error
self.endLoading(error: NSError(domain: "foo", code: -1, userInfo: nil))
//self.endLoading(error: NSError(domain: "foo", code: -1, userInfo: nil))

// No Content
//self.endLoading(error: nil)
Expand Down

0 comments on commit 84a7eaa

Please sign in to comment.