我会给出UIWebView
一些特定的尺寸。例如,我将在UIWebView
. 我使用 IB 调整了UIWebView
小部件的大小,但是当我运行应用程序时,我总是得到一个全屏视图,并且我放在下面的小部件UIWebView
被叠加到小部件上。
问问题
141 次
2 回答
1
你应该把它作为一个子视图:
[UIWebView *aWebView =[[UIWebView alloc] initWithFrame:CGRectMake(x,y,width,height)];
aWebView.delegate=self;
[self.view addSubview:aWebView];
于 2013-01-30T08:43:32.467 回答
0
从理论上讲,您应该能够将您的UIWebView
作为子视图添加到UIView
这样的:
UIView *containerView = [[UIView alloc]initWithFrame:CGRectMake(50,50,50,50)];
[containerView addSubview:yourWebview];
[self.view addSubView:containerView];
此代码段不是用任何形式的 IDE 编写的,因此它可能根本无法编译,也可能根本不编译,它也没有经过测试,但看起来很可信。
于 2013-01-30T08:31:19.683 回答