0

我正在做一个 iPhone 项目。作为其中的一部分,我想知道当我们单击按钮时如何将 uiview 加载到屏幕的一半。

4

2 回答 2

1

您可以使用addSubview:来自UIView 类

于 2013-07-25T08:05:21.370 回答
0
UIView *customView =[UIView alloc]initWithFrame:CGRectMake(10,100,200,200);//Give frame according to your view 
customView.backgroundColor=[UIColor greenColor];
[Self.view addSubView: customView];
于 2013-07-25T08:13:05.213 回答