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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:53:03+00:00 2026-05-26T16:53:03+00:00

The user drags the game piece (the i-th image view) to its target location.

  • 0

The user drags the game piece (the i-th image view) to its target location. The program counts, sees that all the items are in the correct places, announces “Game Over” and sets userInteractionEnabled to NO.

Great, except that if the user’s finger is still down on the game piece, the user can drag the piece back out of the target area by accident. “Game Over” is showing but the piece is no longer in the correct place.

Is there a way to force a touchesEnded (not detect a touchesEnded) so that the contact with the game piece is (effectively) broken when the piece is in its final destination (i.e. so that the user can’t accidentally pull it out of position)?

userInteractionEnabled = NO does not seem to take effect until the touch is released.

  • 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-26T16:53:03+00:00Added an answer on May 26, 2026 at 4:53 pm

    I’m not aware of a way to force touchesEnded.

    Obviously one way to handle this is for your application to maintain state that indicates that the game is over and guard against moving any game pieces when in that state.

    You might try beginIgnoringInteractionEvents, though I doubt this will do what you are looking for. I really think managing state in your application that ensures that you will do the right thing, not moving the piece once the end state has been reached, is the way to go.

    From Apple’s Event Handling Guide for iOS:

    Turning off delivery of touch events for a period. An application can
    call the UIApplication method beginIgnoringInteractionEvents and later
    call the endIgnoringInteractionEvents method. The first method stops
    the application from receiving touch events entirely; the second
    method is called to resume the receipt of such events. You sometimes
    want to turn off event delivery while your code is performing
    animations.

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

Sidebar

Related Questions

I am currently developing a HTML game whereby a user drags items and drops
I am implementing a simple iOS solitaire game that allows the user to drag
I'm developing an android game that uses a surface view for representing the ui
For my iphone game program, I need to take what the user draws and
I'm working on a image viewer that has a draggable scrollbar. When the user
I want to get an icon's image when a user drags and drops it
I'm implementing my drag&drop method. I need that when user drags something on my
In this fiddle when user drags a div auto scroll works in chrome but
I want to load data when the user drags the scroll bar to rhw
I have built so far an application that allows the user to drag and

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.