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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:52:06+00:00 2026-06-10T23:52:06+00:00

In my app I use a button and I assign two methods to them

  • 0

In my app I use a button and I assign two methods to them one is working when you touch down( the button image is changed), the other is working when you touch up inside (another view is opened). so simply, if you want to open a view you press the button but when you touch the button the image is changed and after you raise up your finger the another view is opened. My problem is if you press the button the image is changed, however if you move your finger somewhere away from the button touch up inside is not working as it supposed to be. But the problem is the image sticks with its over version because touch down is triggered once. what should I do? Thanks

  • 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-10T23:52:08+00:00Added an answer on June 10, 2026 at 11:52 pm

    You can handle this in the control states touchDragOutside or touchDragExit depending on exactly what you want it to do. Using touchDragOutside you can detect when the user touches down inside the button and drags their finger away without leaving the touchable bounds of the button, and touchDragExit detects when they drag outside the buttons touchable bounds.

    [button addTarget:self action:@selector(someMethod:) forControlEvents:UIControlEventTouchDragExit];
    [button addTarget:self action:@selector(someMethod:) forControlEvents:UIControlEventTouchDragOutside];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I'm acquireing cookies through my app and use them internally by making requests
Hi in my iPhone app if use for sometime and click home button of
I recently changed my app to use a UINavigationController, I was using a UINavigationBar
I use custom button in my app named addButton and I want to border
I am in mobile app. I use a button that on click checks if
In an ASP.NET MVC app I use jQuery for posting data on button-click: <button
I am working on an app and I want the app to use text
I want to use a Button in my android app but I want to
I have a rails 3 app and I'm trying to use a button to
I am working on a multilingual iOS/Android app and use a xml file to

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.