views:

22

answers:

1

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?

+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
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
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
yes, but copy paste is fantastic!
Jesse Naugher