ios - NSCoding - Protocol Methods (encodeWithCoder, initWithCoder) Repeated Code -
this question has answer here:
- easy way nscoder enabled class 2 answers
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:
- find variables need stored locally.
- write encodewithcoder given variables.
- write initwithcoder given variables.
is there more efficient way this?
just make of classes inherit single class nscoding stuff.
Comments
Post a Comment