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 create nsobject same nsmanagedobject?
  • 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 temporary nsmanagedobject object)

this may basic question, eager know best practice experts.

thanks


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -