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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:13:10+00:00 2026-05-26T23:13:10+00:00

I have a custom UIView class. Inside that view, there is an image view.

  • 0

I have a custom UIView class. Inside that view, there is an image view. (I’m making a UISlider from scratch).

I am trying to get the image view — the thumb of the slider — to move across the view. Below is the code from the UIView class

- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event {

    CGPoint touchPoint = [touch locationInView:self];


    if ( CGRectContainsPoint(self.thumb.frame, touchPoint))

        self.thumb.center = CGPointMake(touchPoint.x, self.thumb.center.y);

    return YES;

}

When I place my finger on the thumb of the slider and try to drag it, nothing happens. However, when I touch outside the thumb of the slider, drag my finger to the thumb without letting go, and then try dragging the thumb, it works fine.

How can I modify my code so that the method will be called when someone holds the thumb and tries to drag it?

  • 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-05-26T23:13:11+00:00Added an answer on May 26, 2026 at 11:13 pm

    My guess is that you have user interaction enabled on your image view, which is in turn not relaying the touch events to the backing logic view. Do something like this:

    self.thumb.userInteractionEnabled = NO
    

    Put that in whatever init method you are using and the thumb view will not interrupt the touch events anymore.

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

Sidebar

Related Questions

i'm trying to do this from inside the .m of a custom view class
I'm developing an iPhone application. I have a class that inherits from UIView .
HI have a custom view class that is loaded and placed within my main
Setup: I have a custom class I've created that handles data retrieved from a
I have a custom view that subclasses UIView. It has a touchesEnded event, however
I have a class that implements UIView and inside - (void)drawRect:(CGRect)rect method I add
I have a custom UIWindow class that has an IBOutlet @interface MyWindow IBOutlet UIView
I have a class that subclasses UIView called DrawView. This class contains custom drawing
i have a custom UIView class,and i have linked my view in IB with
i have created a custom view class which is a subclass of UIview class

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.