iphone - How do you detect when a file is changed in iCloud? -


when file changed in icloud (whether added, deleted, or content changed), call method created ([self methodname]) can update table view names of new files. how notified of file change? need listen nsnotification (if so, it?) or have check manually? thanks.

the name of nsnotification have listen nsmetadataquerydidupdatenotification. how did it:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(querydidupdate:) name:nsmetadataquerydidupdatenotification object:query];  ...  -(void)querydidupdate:(nsnotification *)notification {      //something changed, reload (nsmetadataquery, create nspredicate, rerun query, etc.)  } 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -