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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:27:11+00:00 2026-05-15T01:27:11+00:00

Here is my problem: I am trying to move a puzzle piece around the

  • 0

Here is my problem: I am trying to move a puzzle piece around the screen and then connect to the other piece if they are in close proximity. I have achieved this, though it is perhaps a little odd the way I did. My problem though is that once they have connected, I can’t figure out how to move them as one image, instead of two separate entities. I would really appreciate any help or suggestions. Here is a sample of what I have been doing:

- (void)touchesMovedNSSet *)touches withEventUIEvent *)event{

UITouch *touch = [touches anyObject];
[self dispatchTouchEvent:[touch view] toPosition:[touch locationInView:self.view]];
}

-(void)dispatchTouchEventUIView *)theView toPositionCGPoint)position{

if ((CGRectContainsPoint([picture frame], position))) {
picture.center = position; 
} 
if (CGRectContainsPoint([picture2 frame], position)) {
picture2.center = position;
}
}
  • 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-15T01:27:11+00:00Added an answer on May 15, 2026 at 1:27 am

    What you could also do is set up an array with which pieces are connected, and when one of those pieces are selected, you know to move both pieces (or all connected pieces) at the same time now.

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

Sidebar

Related Questions

(see here for the problem I'm trying to solve) How do you get hibernate
Here's a problem I've been trying to solve at work. I'm not a database
Ok, so here's the full description of the problem I'm having: I am trying
I'm having a strange problem here... I have an ASP.NET 3.5 application that has
I'm having a bit of a problem here. We have 2 urls let me
Here's a problem I ran into recently. I have attributes strings of the form
Here's an interesting problem that I have just come across. It is possible to
I have started to learn game physics and I am trying to move a
I have an application that is finished except for the problem i am trying
I'm trying to make my character move around a tile map with collisions. Everything

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.