1、UIView层次管理(sendSubviewToBack,bringSubviewToFront)
将一个UIView显示在最前面只需要调用其父视图的 bringSubviewToFront()方法。 将一个UIView层推送到背后只需要调用其父视图的 sendSubviewToBack()方法。
例如:[self.view sendSubviewToBack:imageview];
2、视图切换的其中一种方法:
把2个view都放到同一个view(我给他取个变量名views)上做子view然后用[[views subviews] exchangeSubviewAtIndex:1 withSubviewAtIndex:0]这样2个view就可以切换了,我理解的就是2个view放到一个superview上面,这2个view就像数组一样被管理,利用那个exchangeSubviewAtIndex: withSubviewAtIndex:方法来实现哪个view显示在上面
在ViewController中:[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:0]