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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:19:20+00:00 2026-06-02T01:19:20+00:00

I have a UIWebView. Using something like this: http://blog.evandavey.com/2009/02/how-to-make-uiwebview-transparent.html .. I have made the

  • 0

I have a UIWebView. Using something like this:

http://blog.evandavey.com/2009/02/how-to-make-uiwebview-transparent.html

.. I have made the UIWebView transparent. I now need to be able to pass though touches on the webview to the view below, but only on a rectangular portion of the web view.

So, imagine the webview is a square, and it has a square area in the centre which must pass-thru touches to the view below.

Is there a way to do this?

  • 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-02T01:19:21+00:00Added an answer on June 2, 2026 at 1:19 am

    This is a more specific form of hitTest manipulation.

    First, create a subclass of UIView. I called mine ViewWithHole.

    In its header, define a property for a UIView that will be the hole through the outer view. Make this an IBOutlet.

    @property (retain) IBOutlet UIView *holeView;
    

    Then override hitTest. If the point is returns a hit within the hole, return that. Otherwise return what it usually would.

    - (UIView*) hitTest:(CGPoint)point withEvent:(UIEvent *)event;
    {
        CGPoint pointInHole = [self convertPoint:point toView:self.holeView];
        UIView *viewInHole = [self.holeView hitTest:pointInHole withEvent:event];
    
        if (viewInHole)
            return viewInHole;
        else
            return [super hitTest:point withEvent:event];
    }
    

    In Interface Builder, or programmatically, place a ViewWithHole. Put a UIView and a UIWebView within it, in that order. Make the UIView the holeView of the ViewWithHole.

    Interface Builder configuring ViewWithHole

    The holeView can itself be interactive, or you can put any number of interactive views within it. Here, I put a few standard views in there to make sure they work. Any taps on within the hole will be sent to it and its subviews, not the UIWebView on top. Any taps outside the holeView will be received by the UIWebView as usual.

    You can have any number and type of views displayed in front of the hole; all that matters is that the holeView is properly connected.

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

Sidebar

Related Questions

I am attempting to follow this example: http://howtomakeiphoneapps.com/uiwebview-tutorial/239/ I have added a UIWebView into
I have a piece of HTML which I am displaying inside a UIWebView using
I have a UIWebView that loads a link, http://www.google.com/a/datacommsales.net . But I want to
I'm using a UIWebView to display images in base64 ( http://www.abluestar.com/utilities/encode_base64/index.php ). The UIWebView
I have an UIWebView with and using QuartzCore to add some style to this.
Does anyone have experience with pros and cons of using QLPreviewController vs UIWebView to
I have a UIWebView containing html-formatted text. In the text some words are links.
i have copied image from UIwebView using clipboard and i want to mail it.For
I am using a UIWebView on iPhone to do custom input. I have the
I have a UIWebView in my view controller. This UIWebView shows a PDF file.

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.