Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 WebView 的滚动视图上有一个 UIButton,类型为 RoundRect。当我尝试设置它的高度时它不起作用。
我尝试过使用以下代码:
CGRect buttonFrame = CGRectMake(15.0, 89.0, 295.0, 40.0); [btnHideStatus setBounds:buttonFrame]; [webView.scrollView addSubView:btnHideStatus];
有人可以解释为什么高度和宽度没有改变吗?
你试过setFrame :方法吗??
setFrame :
[btnHideStatus setFrame:buttonFrame];