Andy
Andy

Reputation: 41

iPhone SDK image property

I've got a view with an image dynamically loaded. When you click on the image, I want it to load another view with the same image. I've got most of it working, but I'm hung up on getting the image name from the "mother" view.

In this case the "parent" view is avbitView with an UIImage called avbitImage and the child spawned when you click is avbitZoomView which also has an avbitImage.

This piece of code works:

self.avbitZoomView.title = self.title;

whereas, this does not.

self.avbitZoomView.avbitImage.image = self.avbitImage.image;

This looks like it should work, but I'm stuck.??

Upvotes: 1

Views: 200

Answers (1)

Jesse Naugher
Jesse Naugher

Reputation: 9810

you don't need the .image property. avbitImage is your UIImage, so self.avbitZoomView.avbitImage = self.avbitImage; will work. note you may want to make a copy depending on your memory allocation.

Upvotes: 2

Related Questions