nsmanagedobject - What is best practice on show temporary object and update it with original object in ios? -
asking question know right way update existing contents after user adds new content.
here scenario:
- consider app notes app, can save note in server using api
- the user tries add new note tapping create button. hits "save" icon save typed note
- now, need call api (say, addnotes api) store typed note in server
- i need resign "create note" page in app immediately
- when user see notes list page, expect typed note
- but per theory, update notes list view, need api response
- in practical, resigning of "create note" page happens first. because sending api, getting response, calling delegates, parsing content, creating responsible views/cells new item take more time resigning view controller
- here comes problem. smooth experience, of shows temporary object (which stored locally) when "create note" page resigns. after getting api response, update temporary object original object
consider use nsmanagedobject
instead of string notes app. need create temporary object , should gave list view "create" view.
questions:
- should create temporary
nsmanagedobject
? or enough creatensobject
samensmanagedobject
? - with
nsmanagedobject
/nsobject
, can show temporary data in list view. after api response, should delete temporary object , add original object or should update temporary object? (in case, think need create temporarynsmanagedobject
object)
this may basic question, eager know best practice experts.
thanks
Comments
Post a Comment