Skip to content

-[UIImage encodeWithCoder:] unrecognised selector sent to instance ?

March 1, 2012

Note: The below implementation is valid only if you support versions below iOS 5.0. For iOS 5.0 this problem is fixed by Apple.

If you are planning to archive and unarchive the UImage or UIIMageView , do not forget to implement the initWithCoder and encodeWithCoder methods of UIImage.

If you fail to do so, your app will crash with the error: -[UIImage encodeWithCoder:] unrecognised selector sent to instance.

Advertisements
One Comment
  1. Reblogged this on Welcome to Mobile World !!! and commented:

    Got Problems with Archiving and unarchiving UIImage or UIImageView?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: