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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:25:30+00:00 2026-06-07T16:25:30+00:00

I have to make an app in which there are around 20 buttons, if

  • 0

I have to make an app in which there are around 20 buttons, if I switch from one button to another button without removing the touch(i.e. by dragging the touch) I want to call the function when I entered in that button’s frame region.

For example:
enter image description here
when I drag touch from button’s tag 10 to button’s tag 11 then it should call button’s tag 11 selector method.

  • 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-07T16:25:31+00:00Added an answer on June 7, 2026 at 4:25 pm

    I think you can not do it with UIButtons. But i have one suggestion for this may be it help you. Add Images instead of Buttons set those userIntractionEnable:NO then in touchesMoved method you can get call your @selector methods by comparing with X,Y co-ordinates.

    I wrote a small code for this –

    //I added your example image on my self.view with a view
    //of 320x140 and set it userIntractionEnabled:NO
    //Now in touchMoved: method did this..
    
    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    {
        UITouch *touch = [[event allTouches] anyObject];
        CGPoint pt = [touch locationInView:self.view];
    
        //checking the touch is in self.view or not
        if([touch view] == self.view)
        {
            //This is like a 2D array, So you have to follow row and column pattern.
            if((pt.y>=0.0 && pt.y<=70.0))//For First Row
            {
                //These 7 are FirstRow Columns
                if(pt.x>=0.0 && pt.x<=45.0){
                 NSLog(@"Method - 10");
                }
                   if(pt.x>=46.0 && pt.x<=90.0){
                    NSLog(@"Method - 11");
                }
                if(pt.x>=91.0 && pt.x<=135.0){
                    NSLog(@"Method - 12");
                }
    
                if(pt.x>=136.0 && pt.x<=180.0){
                    NSLog(@"Method - 13");
                }
    
                if(pt.x>=181.0 && pt.x<=225.0){
                    NSLog(@"Method - 14");
                }
    
                if(pt.x>=226.0 && pt.x<=270.0){
                    NSLog(@"Method - 15");
                }
    
                if(pt.x>=271.0 && pt.x<=315.0){
                    NSLog(@"Method - 16");
                }
    
            }
            //Row change this is for Second Row
            if((pt.y>=71.0 && pt.y<=140.0))
            {
                //These 7 are SecondRow Columns
                if(pt.x>=0.0 && pt.x<=45.0){
                NSLog(@"Method - 17");
                }
                if(pt.x>=46.0 && pt.x<=90.0){
                    NSLog(@"Method - 18");
                }
                if(pt.x>=91.0 && pt.x<=135.0){
                NSLog(@"Method - 19");
                }
    
                if(pt.x>=136.0 && pt.x<=180.0){
                    NSLog(@"Method - 20");
                }
    
                if(pt.x>=181.0 && pt.x<=225.0){
                NSLog(@"Method - 21");
                }
    
                if(pt.x>=226.0 && pt.x<=270.0){
                NSLog(@"Method - 22");
                }
    
                if(pt.x>=271.0 && pt.x<=315.0){
                    NSLog(@"Method - 23");
                }
    
            }
    
        }
    }
    

    Hope this will help you !!!! 🙂

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

Sidebar

Related Questions

I have to make an application in which the user moves around a screen,
Hello i have a app which makes 3 wheels from 3 different arrays of
I have an iPhone app which contains around 80 PNG format images measuring 300x300
I have been looking around at tutorials on how to make an iPhone app
I have around 10 bodies in my Box2D sample app which i have created
I have to make an android app. It is about counting Bunks for college
I have to make a mobile app that calculates the real life size of
I make an app that have to printing image. I need to print image
i have tryed to make my own app and to use google maps. I
I have to make a peer to peer file sharing app on android platform

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.