ras*_*tin -1 iphone events touch uiscrollview ipad
我有个问题.我有一个UISCrollView,当用户触摸scrollView并发送到其他ScrollView o TableView这些scrollMove时,我需要获取该事件.
我如何将ScrollView中的移动捕获发送到其他ScrollView或TableView以进行这些移动.
对于简单的触摸,我使用touchesBegan,touchesMoved和touchesEnded,但touchesMove在UIScrollView中不起作用,并且无法将这些移动发送到其他ScrollView或TableView.
我举了一个例子.我需要将secondView scrollView冲突区域中的scroll事件发送到tableView,以便在tableView中进行make scroll.
First View
-----------------------------
- - -
- - -
- T - -
- A - -
- B - -
- L - -
- E - -
- V - -
- I - -
- E - -
- W - -
- - -
- - -
-----------------------------
Second View --> ##### is the ScrollView area on tableView FirstView
-----------------------------
- -###### -
- -###### -
- -###### -
- -###### -
- -###### -
- -###### SCROLL -
- -###### VIEW -
- -###### -
- -###### -
- -###### -
- -###### -
- -###### -
- -###### -
-----------------------------
###### I need scroll on this area and send the moviment to back tableView.
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助!
HI,
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGestureCaptured:)];
[scrollView addGestureRecognizer:singleTap];
Run Code Online (Sandbox Code Playgroud)
你可以在这个方法中触及
- (void)singleTapGestureCaptured:(UITapGestureRecognizer *)touch
{
CGPoint touchPoint=[gesture locationInView:scrollView];
}
Run Code Online (Sandbox Code Playgroud)
(滚动视图触摸)的副本
| 归档时间: |
|
| 查看次数: |
2724 次 |
| 最近记录: |