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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:18:18+00:00 2026-05-25T17:18:18+00:00

I am facing below problem:- Please have a look in the below image the

  • 0

I am facing below problem:-
Please have a look in the below image the thing what i want is:-
enter image description here

I want to drag default images from view 1 to view 2 and images have to be always thr in view1 so its not like touch moved to draging images .
i tried a lot things in that but i succeed in draging image from one view to another but in view2 i am not able to get touch points so its just adding thr as frame
But i cnt able to touch tht image across view2 and even in view2
i want to do other functionality like zooming and others but first want to get touch points in view2.
I am giving description image about this problem.

The edited question is:-

i have done this simple demo in this i am transferring one view to another view and after getting view2 points its been in its limit boundaries.
but how can i get the default things remain in their.
i will modify this code i will add images in this view. but its just shows my thinking here so guide me here.

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{

    UITouch *touch = [touches anyObject];   
    if ([touch view] == view3) {
        CGPoint location = [touch locationInView:self.view];
        view3.center = location;        
        return;
    }
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
        int tmpValue = 0;
        [UIView beginAnimations:nil context:NULL];
        [UIView setAnimationDuration:0.5];          
        {
            onceDone = TRUE;
            if(onceDone == TRUE)
            {
                UITouch *touch = [touches anyObject];
                CGPoint pt = [touch locationInView:self.view];
                NSLog(@"X = %f y=%f",pt.x,pt.y);
                view3.center = pt;
                if(view3.frame.origin.x < view2.frame.origin.x )
                   //view3.frame.origin.x < view2.frame.origin.x)
                    [view3 setFrame:CGRectMake(159,view3.frame.origin.y, view3.frame.size.width, view3.frame.size.height)];

            }



        }
    [UIView commitAnimations];
    }

Please help me.
it is urgent.
Thanks in advance

  • 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-25T17:18:19+00:00Added an answer on May 25, 2026 at 5:18 pm

    We have been working in a similar issue, and we have made up with this solution:

    1. We have an UIPanGestureRecognizer added to each button.

    2. When we detect the pan gesture begin, we create the object we want to drag (in this case, it could be a copy of your image). You should have to set a rect equals to the button, or if you create the object in a different view, you should have to convert the object coordinates so the object seems in the same position as the button, but inside his view.

    3. After that we move the last created object, instead of move the button.

    And that is, the trick here is the UIPanGestureRecognizer works until you untouch the screen, but it is triggered while you move your finger for all the screen, not only inside the button!

    I hope this works for you.

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

Sidebar

Related Questions

I am facing a problem with .NET generics. The thing I want to do
I am facing problem with hibernate annotations.For the code shown below I have a
Below is the problem i am facing at the moment. i have an activity
I have code snippet like below I am facing problem when I click on
That was helpful kgiannakakis. I'm facing a problem as below: a = ['zbc','2.3'] for
I'm facing a problem with IE6. I took the toggle function from this website
I'm facing a strange problem with NSUsrDefaults. Whenever I'm fetching the data from NSUserDefaults,
The problem I am facing with below code is that whenever I try to
I am facing problems with Refinement Panel in SharePoint 2010 . Please find below
These days I'm facing a problem with encoding string from an array of byte.

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.