ios - Displaying a large amount of data from Core Data -
i have such task in front of me: there more 10,000 records in database, need display them in table view, can not take 10,000 , store in array how organize work, example, when scrolling 100 records in table view, download next 100 entries database.
i found things fetchlimit , fetchoffset, still did not understand how use them task.
what tell me?
i believe if using core data , need uitableview
should defiantly use nsfetchedresultscontroller
.
from apple documentation.
you use fetched results controller efficiently manage results returned core data fetch request provide data uitableview object.
by using of approach going use default cache improve performance. going dynamically update uitableview
when of records in core data changed or added.
also fetch data portion can modify nsfetchrequest
, setfetchlimit
each request.
example of simple nsfetchedresultscontroller
implementation.
Comments
Post a Comment