I have created a UIImageView in my code:
UIImageView *background = [[UIImageView alloc]initWithFrame:CGRectMake(150, 60, 180, 180)];
[self.view addSubview:background];
and I have also got a UIImageView in my XIB. The programmatically-created UIImageView appears on top of the XIB’s UIImageView. How do I change this so the XIB’s UIImageView appears on top?
Generally I would put my background directly in the nib file. But to add it programmatically, use
insertSubview:belowSubview:,insertSubview:atIndex:, orsendSubviewToBack:to put it where you want it.