开发者

How can I connect an IBOutlet from my code to two different objects in interface builder

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, w开发者_JAVA百科henever I try and link the second image, the first image becomes disconnected. How can I connect two images to the same IBOutlet code?


IBOutlet variables have a one-to-one relationship with objects in interface builder. Therefore you will have to have another variable.


put them in two different xib file then can access them using a single iboutlet using the code [[NSBundle mainBundle] loadNibNamed:@"tests" owner:self options:nil];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜