I'm using the iPhone SDK 4.0 and I want to connect IBOutlet UIImageView *block;
to more than one image on the view in interface builder. However, whenever I try and link the second image, the first image becomes disconnected.
How can I connect two images to the same IBOutlet code?
views:
22answers:
1
+2
A:
IBOutlet variables have a one-to-one relationship with objects in interface builder. Therefore you will have to have another variable.
Jesse Naugher
2010-08-31 17:41:01
Just what @Jesse said, ... IBOutlets are unlike IBActions which can have a many connections. While a Button can cause many actions to occur, the UIImageView can only display a single image at a time.
Stephen Furlani
2010-08-31 17:45:16
I'm not trying to display two images in the same imageview, i'm trying to display two imageview in the same view.I guess that means I need to write another IBOutlet for a *block2 and rewrite all the code judging by what's been said
Jon
2010-08-31 17:47:55
yes, but copy paste is fantastic!
Jesse Naugher
2010-08-31 17:53:29