我在每个帧(0,0,320,480)的窗口上有两个视图(滚动视图和顶视图),
[window addsubview:scrollview];
[window addsubview:topview];
在滚动视图中我正在进行缩放、捏合操作,在顶视图视图中我有放置了一些按钮。我的问题是我想处理对两个视图的触摸,就像用户可以在滚动视图中捏合一样,而且他必须能够按下顶视图上的按钮。 (我没有在滚动视图上添加顶视图,因为如果我添加它们也会滚动,这些按钮就会被修复)。
我一次只能接触到一个视图。如何处理对两个子视图的触摸任何想法。
谢谢,
I Have two views(scrollview and topview) on a window each of frame (0,0,320,480),
[window addsubview:scrollview];
[window addsubview:topview];
In scrollview i am doing zooming,pinching operation and in topview view i have placed some buttons. My problem is i want to handle touches to both views like user can do pinching in scrollview and also he must be able to press buttons on topview. ( I am not adding topview on scrollview because these buttons are fixed if i add they also scroll).
I am getting touches to only one view at a time. How to handle touches to both subviews any idea.
Thanks,
发布评论
评论(1)
你在俯视图中看到了什么?只有按钮?
如果是,则将它们从顶视图中移除,并将它们直接放置在窗户上并将它们带到前面。
What are you having in top view? only buttons?
If yes, then remove them from top view and place them directly on to the window and bring them to front.