0

我有 2 个 UIImageViews, IMG1 和 IMG2 。有些人我希望 IMG1 出现在 IMG2 上方,而在其他时候我希望 IMG2 出现在 IMG1 上方。我该怎么做呢 ?

4

2 回答 2

3

尝试使用

[self.view bringSubviewToFront:myImageView];
于 2009-03-14T13:11:22.917 回答
3

还,

[self.view exchangeSubviewAtIndex:imageView1Index withSubviewAtIndex:imageView2Index];

如果您知道各个视图的索引,可能会这样做。

于 2009-03-14T14:12:08.450 回答