My dilemma is as follows:
I have a custom subclass of UIImage (I've added some serialization methods i.e. initWithCoder, encodeWithCoder), and I would like to apply my custom subclass as a variable to a UIImageView, or at least a subclass of UIImageView.
As you are aware, UIImageView has a variable called "image", that is of type UIImage. I'd like to override this variable with my subclass.
My goal is to have a UIimageView that will respond to archivedDataWithRootObject without crashing with the encodeWithCoder message is sent to the variable image. If there is a smarter way to get there, I'm open to suggestions.
Thank you!
[edit] I think one possible route is through some type of casting...However:
UIImage *image = [[UIImage alloc] init];
MLImage *mlImage = [[MLImage alloc] init];
mlIamge = (MLImage*)image;
When I mouse-over mlImage after the second line executes, I can see that it is of type MLImage. However, even with the cast, after the third line executes mlImage becomes a UIImage. What do I need to do to change the type of image to MLImage? [/edit]