子视图不会通过捏合手势调整大小
我有几个子视图添加到 UIScrollview 中。左右滑动时一切正常,即子视图随着滑动而移动。当我使用捏合手势时,子视图不会与滚动视图的其他内容一起放大和缩小。在上下文中绘制的所有内容都工作正常,但子视图保持相同的大小,但我认为基于其起源的移动而移动,例如在屏幕外伸展时。
我正在调用...
[scrollView setAutoresizesSubviews:YES];
viewDidLoad。 调用了...。
subView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeigh
我还为添加的每个子视图
我错了什么,或者这不是这样做的方法?
I have several subviews added to a UIScrollview. Every thing works fine when swiping left and right, ie the subviews move with the swipe. When I use the pinch gestures the subviews do not zoom in and out with the other contents of the scrollview. Everything drawn in context works fine but the subviews remain the same size but move I think based on the movement of their origins, off screen for example if pinching out.
I am calling...
[scrollView setAutoresizesSubviews:YES];
on viewDidLoad. I have also called...
subView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeigh
for each subview added.
What am I dong wrong, or is this not the way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否声明了委托函数以在调用视图时调整视图大小?
Have you declared the delegate functions to resize the view when it is called ?