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 9255741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:46:42+00:00 2026-06-18T11:46:42+00:00

I am having a problem with gesture recognition in a subview of a UIView.

  • 0

I am having a problem with gesture recognition in a subview of a UIView. My subview is a view that will be draggable through a UIPanGestureRecognizer – I know that part works. But I’m having a problem getting the touches to that view in the first place. The touches are coming to my UIView – not the subview I want them to go to. I’ve tried force-redirecting the touches to my target view with this code:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"rT");
    [self.valueLabel touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"mT");
    [self.valueLabel touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"eT");
    [self.valueLabel touchesEnded:touches withEvent:event];
}

…but then my console goes crazy – infinite loop

...
2013-02-08 17:07:33.683 Totalizer[3810:907] rT
2013-02-08 17:07:33.684 Totalizer[3810:907] rT
2013-02-08 17:07:33.685 Totalizer[3810:907] rT
2013-02-08 17:07:33.686 Totalizer[3810:907] rT
2013-02-08 17:07:33.686 Totalizer[3810:907] rT
2013-02-08 17:07:33.687 Totalizer[3810:907] rT
2013-02-08 17:07:33.688 Totalizer[3810:907] rT
2013-02-08 17:07:33.689 Totalizer[3810:907] rT
2013-02-08 17:07:33.690 Totalizer[3810:907] rT
2013-02-08 17:07:33.691 Totalizer[3810:907] rT
2013-02-08 17:07:33.692 Totalizer[3810:907] rT
2013-02-08 17:07:33.692 Totalizer[3810:907] rT
2013-02-08 17:07:33.693 Totalizer[3810:907] rT
2013-02-08 17:07:33.694 Totalizer[3810:907] rT
2013-02-08 17:07:33.695 Totalizer[3810:907] rT
2013-02-08 17:07:33.696 Totalizer[3810:907] rT
2013-02-08 17:07:33.697 Totalizer[3810:907] rT
2013-02-08 17:07:33.698 Totalizer[3810:907] rT
2013-02-08 17:07:33.700 Totalizer[3810:907] rT
2013-02-08 17:07:33.701 Totalizer[3810:907] rT
2013-02-08 17:07:33.702 Totalizer[3810:907] rT
2013-02-08 17:07:33.703 Totalizer[3810:907] rT
2013-02-08 17:07:33.704 Totalizer[3810:907] rT
2013-02-08 17:07:33.705 Totalizer[3810:907] rT
2013-02-08 17:07:33.706 Totalizer[3810:907] rT
2013-02-08 17:07:33.707 Totalizer[3810:907] rT
2013-02-08 17:07:33.708 Totalizer[3810:907] rT
2013-02-08 17:07:33.709 Totalizer[3810:907] rT
2013-02-08 17:07:33.710 Totalizer[3810:907] rT
2013-02-08 17:07:33.711 Totalizer[3810:907] rT
2013-02-08 17:07:33.713 Totalizer[3810:907] rT
...

I can’t seem to figure this out.

Anything helps (within reason…)

Erway Software

  • 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-18T11:46:44+00:00Added an answer on June 18, 2026 at 11:46 am

    Your posted code goes into a loop because

    valueLabel isn’t responding to touchesBegan:, touchesMoved:, and touchesEnded:…
    This calls trickle back up to your code.

    It is an unintentional recursive loop.

    Definitely drop that approach. Have you tried valueLabel.userInteractionEnabled = YES?

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

Sidebar

Related Questions

I'm having problem with datagrid view. I have attached an image with the code
I'm having problems simply translating a view with UIPanGestureRecognizer while setting the UILabel's text
Im having this problem for weeks already. because my app needs a function that
Having problem with jquery submit(). The problem is that it doesn't work on the
having problem with null pointer exception and i read few article bout that error
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
Im having problem in my UIscrollView ,this is what I have done: Whenever a
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I am having problem with previewing custom performance counters with PerflibV2. Performance Monitor shows
I am having problem to get a numerical value for this expression where I

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.