iPhone 模拟器上的捏合缩放
我从来没有让这个工作过。我到底做错了什么? :) 我有一个滚动视图,minimumZoomScale = 0.85,maximumZoomScale 是 2.0。我向滚动视图添加一个子视图。子视图的大小大于滚动视图,我已将滚动视图的内容大小设置为等于子视图的大小。
子视图为 850 x 1100,滚动视图为 722 x 935。
scrollView.contentSize = subview.frame.size;
scrollView.minimumZoomScale = 0.85;
scrollView.maximumZoomScale = 2.0;
如何在模拟器中捏缩放?我在网上读到,我应该在单击拖动时按住 Option 键,但这对我来说永远不起作用。我已经尝试了所有其他修饰键,但它们都不起作用。
我做错了什么?
I have never gotten this to work. What the heck am I doing wrong? :) I have a scroll view, the minimumZoomScale = 0.85, the maximumZoomScale is 2.0. I add a subview to the scroll view. The size of the subview is larger than the scrollview and I've set the scrollview's content size equal to the size of the subview.
Subview is 850 x 1100, scrollView is 722 x 935.
scrollView.contentSize = subview.frame.size;
scrollView.minimumZoomScale = 0.85;
scrollView.maximumZoomScale = 2.0;
How do I pinch zoom in the simulator? I've read online that I'm supposed to hold down the Option key while click-dragging, but that never works for me. I've tried all of the other modifier keys and none of them work either.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否记得为滚动视图设置委托并从
viewForZoomingInScrollView:
返回适当的视图?否则,发布一些实际代码。Did you remember to set a delegate for the scroll view and return the appropriate view from
viewForZoomingInScrollView:
? Otherwise, post some actual code.