本文介绍了UIView。如何将子视图放在父父视图后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在做一点UIView争吵,被卡住了。这是直接改变兄弟的子视图的z顺序。 [mySuperview sendSubviewToBack:mySubview]将mySubview置于其所有的兄弟姐妹之下。
I'm doing a bit of UIView wrangling and am stuck. It is straightforward changing the "z" order of sibling subviews. [mySuperview sendSubviewToBack:mySubview] places mySubview behind all it's siblings.
但是如何在父视图之后放置一个子视图?
But how do I place a subview behind it's parent?
感谢,
Doug
Thanks,Doug
推荐答案
您可能想将两者放入容器视图,可以正确地放置一个在另一个之后,而不影响超视觉真的意味着持有任意视图(虽然这可能会工作很好)。
You may want to put both into a container view, so that you can properly place one behind the other without affecting a superview not really meant to hold arbitrary views (although that will probably work just fine).
这篇关于UIView。如何将子视图放在父父视图后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!