另一个UIView下面的addSubview

问题描述 投票:9回答:2

我希望能够在另一个已经存在的UIView下面添加Subview,我该怎么做?我一直没能找到任何东西。

iphone objective-c uiview addsubview
2个回答
23
投票

UIView方法怎么样:insertSubview:belowSubview:。 它就在UIView文档的"Managing the View Hierarchy"部分。


7
投票

您可以使用 :

[self.view insertSubview:topview belowSubview:buttomView];
© www.soinside.com 2019 - 2024. All rights reserved.