Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8296417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:59:08+00:00 2026-06-08T14:59:08+00:00

My problem is quite strange but simple. I subclassed a my customer UIScrollView: MyScrollView,

  • 0

My problem is quite strange but simple.
I subclassed a my customer UIScrollView: MyScrollView, where i disabled the scroll:

 self.scrollEnabled = NO; 

that means apart from

 - (void)scrollViewDidScroll:(UIScrollView *)scrollView 

all other UIScrollViewDelegate method won’t be called
and in MyScrollView i do the content scroll by detecting the user touch movement on screen, that is to say no flipping, no bounces, my implementation is in the touchesMoved:withEvent: method

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
{ 
    UITouch *touch = [touches anyObject];
   // NSLog(@"touch.phase:%d",touch.phase);
    CGPoint currentPosition = [touch locationInView:self];
    CGPoint lastTouchPosition = [touch previousLocationInView:self];
    CGFloat deltaY = lastTouchPosition.y - currentPosition.y;
    CGFloat contentYOffset = self.contentOffset.y + deltaY;
    [self setContentOffset:CGPointMake(0,contentYOffset) animated:NO];

}

after the user drag movement have been finished, i do my own method according to the content offset of MyScrollView in touchesEnded:withEvent:

 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 
 {
     //some implementation according to current content offset
 }

user moves finger on screen, whenever the finger left the screen surface, the touchesEnded:withEvent: get called and i can implement my own method correctly.

BUT, when user move finger on screen surface from inside the screen to outside either on top or bottom, then lift the finger up, the touchesEnded:withEvent: method never got called, it seems like the ios doesn’t treat the move out bounds(top or bottom) event as a touches end event, also ios wouldn’t know the what is going on when touch is outside it screen bounds

someone may suggest me to detect the current position in touchesMoved:withEvent: to check out whether it is inbounds or not. this MAY WORK WHEN THE MOVEMENT IS VERY SLOW, but when you move very fast, the system can not detect every point position, it seems like the movement is detected in a certain time interval.
can any one help me out how could i detect if the user finger has moved out of bounds or not

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:59:11+00:00Added an answer on June 8, 2026 at 2:59 pm

    I have resolved this problem
    bcs UIScrollView does too much work that we can not handle some event ourselves, fortunately the UIView can detect the touche move out of bounds and will invoke the touchesEnd:withEvent: method.
    considering that replacing MyScrollView’s superclass with UIView has too much work to do, so i figured out a simple way to resolve:
    i added an TouchActionDetectView subclassed from UIView, whose work is to detect all user touches event and deliver those event to MyScrollView. of course i have to clear the background color of TouchActionDetectView to avoid blocking other view content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
I have a strange problem that I can't seem to solve. I've quite a
I have this quite popular problem, but have failed to find a solution that
I'm having a quite strange problem with the fwd_iterator that I'm implementing: if I
I have got an strange problem but I am quite sure, for you it
I have quite a strange problem with PHP and Apache on my local testing
I noticed people wrote about this circular reference problem quite a bit before but
My problem is quite simple: I have a 400MB file filled with 10,000,000 lines
The problem is probably quite simple. $q = SELECT id FROM users WHERE name
I'm trying to write quite strange query and i'm having problem with if statement,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.