ios - NSFetchedResultsController Called When Not in View -


i have:

  • viewcontroller_a
  • viewcontroller_b
  • viewcontroller_c

where there's nsfetchedresultscontroller powering tableview in b.

my problem can edit b's underlying data while in or c. when edit b's underlying data or c, runs b's delegate function:

func controller(_ controller: nsfetchedresultscontroller<nsfetchrequestresult>, didchange anobject: any, @ indexpath: indexpath?, type: nsfetchedresultschangetype, newindexpath: indexpath?) { 

so appears observer still running, makes sense because never dismissed b. still, delegate function tries update b's tableview , causes crash every time.

i'm new using nsfetchedresultscontroller , appreciate advice on how prevent observer behaving way.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -