Skip to content

Instantly share code, notes, and snippets.

@bobleesj
Created December 28, 2016 15:09
Show Gist options
  • Save bobleesj/e4db4bd4eb257594367861eec844bc35 to your computer and use it in GitHub Desktop.
Save bobleesj/e4db4bd4eb257594367861eec844bc35 to your computer and use it in GitHub Desktop.
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableView: UITableView!
let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
var tasks: [Task] = []
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
}
override func viewWillAppear(_ animated: Bool) {
getData()
tableView.reloadData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment