ios - NSCoding - Protocol Methods (encodeWithCoder, initWithCoder) Repeated Code -


this question has answer here:

i using nscoding local data persistence. have bunch of model classes need stored locally. i've been implementing encodewithcoder , initwithcoder protocol methods hours. it's not "coding", it's repeating following 3 steps:

  1. find variables need stored locally.
  2. write encodewithcoder given variables.
  3. write initwithcoder given variables.

is there more efficient way this?

just make of classes inherit single class nscoding stuff.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -