views:

22

answers:

1

I can't seem to get NSCoding to store the 'frame' or 'center' properties of my UIImageView subclassed object. It seems to store everything else, both custom properties and standard class properties (e.g. 'hidden', etc...), but not the 'frame' or 'center' properties. I'm NOT trying to archive a UIImage (as this does not comply with NSCoding).

I will post code if needed but I'm not doing anything special to the 'frame' other than setting it.

Any ideas?

+1  A: 

Frame is based on the parents coordinate system and there is no parent until you add the view. If you have a subclass you could override the coding methods and store the frame yourself, although it might not end up being in the right position based on the parent view.

Scott Densmore
Thanks Scott for the quick response. That makes sense.
JMH