Answers for "viewWillAppear siwft 5"

0

view will appear

override func viewWillAppear(_ animated: Bool) {
        if let context = (UIApplication.shared.delegate as? AppDelegate)?.persistentContainer.viewContext {
            if let coreDataToDoItems = try? context.fetch(ToDoItem.fetchRequest()) as? [ToDoItem] {
                toDo = coreDataToDoItems
                tableView.reloadData()
            }
    }
}
Posted by: Guest on April-15-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language