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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:01:52+00:00 2026-05-31T21:01:52+00:00

I m a currently working on gestures in an Iphone application i used the

  • 0

I m a currently working on gestures in an Iphone application

i used the touch gesture function which are working properly.

my touch gesture functions are working on an Image (Like Dragging)
i want to ask is there a way to get the id of that image which is currently in touch gesture function

the touchMoved Function is like that

- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
    // Calculate and store offset, and pop view into front if needed
    CGPoint pt = [[touches anyObject] locationInView:self];
    startLocation = pt;
    [[self superview] bringSubviewToFront:self];
}
// During movement, update the transform to match the touches
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
{

    // Calculate offset
    CGPoint pt = [[touches anyObject] locationInView:self];
    float dx = pt.x - startLocation.x;
    float dy = pt.y - startLocation.y;
    CGPoint newcenter = CGPointMake(self.center.x + dx, self.center.y + dy);


    // Remove Image (set Cordinated out of View)
    if ((newcenter.x <= 9) || (newcenter.y >= 403)) {
       //NSLog(@"Delete Image");
       newcenter.x = 1000;
        newcenter.y = 1000;

 }


     self.center = newcenter;
    //    
}
  • 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-31T21:01:53+00:00Added an answer on May 31, 2026 at 9:01 pm

    To detect your touched imageView

    - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
    {
        if([[touch valueForKey:@"view"] tag] > 0)
        {
            yourImageView=[touch valueForKey:@"view"]; //here's the magic :)
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a music player app, and like the iPod application, I
Am currently working on an application that requires users to submit posts and comments
Im currently working with an API which requires we send our collection details in
I`m currently working on a script, and I have the following situation. function somnicefunction()
Currently working on a Spring 2.5 web application, looks as if the business has
Currently working in Java, i'd like to be able to select part of an
Im currently working on an app which lists a set of objects in a
I currently working on a project which uses Spree Cart and which has hence
Im currently working on a site which will contain a products catalog. I am
I have a universal binary application and currently working on the iPad version of

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.