L
L
Lorem Ipsum2020-02-05 11:04:07
Swift
Lorem Ipsum, 2020-02-05 11:04:07

How to reload a UITableView after dismissing another ViewController?

Hello! CategoriesViewController has a TableView into which I draw data from CoreData. There is a button, by clicking on which AddCategoryVC appears modally, on it new entries are added to CoreData, after saving the AddCategoryVC data, I remove it from the screen using the dismiss method. Now the question arose how to reload the TableView of the CategoriesViewController. Tried to pass CategoriesViewController as a property to AddCategoryVC and reload the table, but it doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Vorobei, 2020-02-05
@GeorgeGeorge

You need observers . Read more here .
The cordatas are scary, I love them from Realm.
In observer processing, you can check changes in old and new data, rearrange and delete animatedly .
Delegates, notifications, viewWillAppear - solutions on the verge of crutches , forgive me my colleague.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question