开发者

Detect scroll event in UIScrollView and send to UITableView or other UIScrollView

I have a problem. I have a UISCrollView and I need obtain the event when the user touch the scrollView and send to other ScrollView o TableView these scrollMove.

How I can send the move capture in my ScrollView to other ScrollView or TableView for make these movement.

For simple touches I use touchesBegan, touchesMoved and touchesEnded, but the touchesMove don't work in UIScrollView and can't send these movement to other ScrollView or TableView.

I put a example. I need send the scroll event in secondView scrollView conflict area to the tableView for make scroll in tableView.

     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.

Thank you for your help!


HI,

UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGestureCaptured:)];
[scrollView addGestureRecognizer:singleTap];    

and u can the touches inside this method

- (void)singleTapGestureCaptured:(UITapGestureRecognizer *)touch
{ 
CGPoint touchPoint=[gesture locationInView:scrollView];
}

Copy of (Scroll View Touches)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜