CGFloat width = textField.text.floatValue;
CGFloat height = textField2.text.floatValue;
CanvasView *canv = [[CanvasView alloc] initWithFrame:CGRectMake((self.myscrollview.frame.size.width - width)/2, (self.myscrollview.frame.size.height - height)/2, width, height)];
[canv setBackgroundColor:[UIColor whiteColor]];
self.canvas = canv;
[self.myscrollview addSubview:canv];
我正在使用此代码UIView
在运行时在 a中添加 a ,UIScrollView
并且width
and参数是在运行时height
从用户那里获取的,但问题是:
如果and大于其大小,则它不显示水平滚动条。width
height
UIScrollView
为什么是这样?