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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:54:52+00:00 2026-06-18T07:54:52+00:00

Here I want to get the touch for button action event on button tap

  • 0

Here I want to get the touch for button action event on button tap – B

and when image is tapped (on visible area of image) the tap gesture method will call

but problem is image is on the button and its covers some part of the button
I wants to execute the button action event on that covered portion – A

I have tried but not able to get the button action on covered portion 🙁

Image Masking

  • 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-18T07:54:53+00:00Added an answer on June 18, 2026 at 7:54 am

    Put a transparent button over that portion

    update

     -(void)singleTapImageview:(UITapGestureRecognizer *)gesture
     {
        NSLog(@"single-tap");
        CGPoint touchLocation = [gesture locationInView:self.imageViewParent];
        float x = touchLocation.x;
        float y = touchLocation.y;
    
        //Using gesture recogniser you can get the current position of touch
    
        UIImage* image = imageViewParent.image;
        CFDataRef data = CGDataProviderCopyData(CGImageGetDataProvider(image.CGImage));
        UInt8 *pixels = (UInt8 *)CFDataGetBytePtr(data);
    
        UIGraphicsBeginImageContext(image.size);
        [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)];
        CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
        CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 1);
        CGContextSetStrokeColorWithColor(UIGraphicsGetCurrentContext(), [UIColor redColor].CGColor);
        int index = ((x + (y * (int)image.size.width)) * 4) + 3;
        CGFloat alpha = pixels[index];
        if (alpha == 0)
        {
            // call button acton
        }
    

    }

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

Sidebar

Related Questions

I want to get the out parameter of stored procedure using Zend framework Here's
I want to get the number of seconds since midnight. Here is my first
I want to get a field in SQL server 2008 from python 2.6. Here
Here's what I'm trying to do: I want to get a list of all
Here's the scenario, I want to get Data from the Service to Activity Whenever
I just want to get the total days in a list of dates. Here
I want to know about the best practices here. Suppose I want to get
I hope I am not missing something very obvious here, I want to get
I want to make functor to generic function, but I get compiler error. Here
I have a code that get the coordinate of image view, and i want

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.