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

  • Home
  • SEARCH
  • 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 8370195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:51:22+00:00 2026-06-09T13:51:22+00:00

While my user is dragging his finger while holding down a UIButton, can I

  • 0

While my user is dragging his finger while holding down a UIButton, can I get the touch location for the finger at that point? If I can’t do this it seems that I could probably create a UIImageView and give it button qualities. After this I would implement the touches began, moved, ended methods.

These methods; however, do not run while a UIButton has been touched.

The reason I need this is because I wanted to find out the direction of a touch drag outside movement, and for various other reasons too, but if this is impossible I will have to create UIImageViews I think.

Also, I do not subclass UIButton, I am too much beginner to take on apples clusters.

  • 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-09T13:51:23+00:00Added an answer on June 9, 2026 at 1:51 pm

    you should following this:

    [myButton addTarget:self action:@selector(dragHandler:withEvent:) forControlEvents:UIControlEventTouchDragInside];
    [myButton addTarget:self action:@selector(dragHandler:withEvent:) forControlEvents:UIControlEventTouchDragOutside];
    
    -(void)dragHandler:(UIButton *)sender withEvent:(UIEvent *)event
    {
        UITouch *touch = [[event allTouches] anyObject];
    
        NSLog(@"touchInfo:%@", NSStringFromCGPoint([touch locationInView:self.view]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing a sound effect that plays while a user is dragging a
In C# Winforms, while user first load the form, I get the input as
I have a client that wants audio to play while the user is browsing
So I have an app that plays a bunch of songs while the user
I use asp:Login control, user can login properly, but while checking user Profile information
How can i put an image in corner or center of cursor while user
Here is what I'm doing. My application takes points from the user while dragging
While user uploading a file, is it possible to know if the uploaded file
The following code I used to replace .(dot) by ,(coma) while user inputing value
Possible Duplicate: Getting “Permission denied” page in the admin, while user has permission I've

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.