【问题标题】:Cannot set height and width for UIButton on WebViews ScrollView无法在 WebViews ScrollView 上为 UIButton 设置高度和宽度
【发布时间】:2012-07-24 06:38:45
【问题描述】:

我在 WebView 的滚动视图上有一个 UIButton,类型为 RoundRect。当我尝试设置它的高度时它不起作用。

我已尝试使用以下代码:

CGRect  buttonFrame = CGRectMake(15.0, 89.0, 295.0, 40.0);
[btnHideStatus setBounds:buttonFrame];

[webView.scrollView addSubView:btnHideStatus];

有人可以解释为什么高度和宽度没有改变吗?

【问题讨论】:

    标签: iphone ios webview uibutton


    【解决方案1】:

    你试过setFrame :方法吗??

    [btnHideStatus setFrame:buttonFrame];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-17
      • 2013-02-09
      • 1970-01-01
      • 1970-01-01
      • 2021-10-16
      • 2019-01-12
      • 1970-01-01
      • 2011-06-12
      相关资源
      最近更新 更多