문제

i have to port existing iOS code (which is using NSFetchedResultController) to OS X, can u please give me some code snippets on how to get contentWillChange and contentDidChange events using NSArrayController.

올바른 솔루션이 없습니다

다른 팁

You don't. NSArrayController does all that, and more, when you bind it to a tableview and set its entity type properly.

Using bindings you can remove all of the table data source code that you had for iOS.

If you want to recreate NSFetchedResultsController, you need to listen to managed object notifications and act on them in the same way, but bindings is much easier.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top