• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WebView in a layer view hierarchy - not working on Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebView in a layer view hierarchy - not working on Snow Leopard


  • Subject: Re: WebView in a layer view hierarchy - not working on Snow Leopard
  • From: Luke Evans <email@hidden>
  • Date: Sat, 24 Oct 2009 12:27:04 -0700

Oh-oh. OK, 'tis as I feared then - I was living on a wing and a prayer with Leopard (which did work perfectly in this regard to my use of WebView in a layer-backed view hierarchy - i.e. at the bottom of the stack).

I took a look at WebUIDelegate (as I think I had done a long while back, while playing with how to draw over the top of web content). I can't see from the docs how to use such a delegate to draw over the web content. The delegate seems to be empowered to control a lot of the expected user interactions, but I'm not sure how you would draw with it.

BTW, I tried subclassing WebView when I was playing with it, way back, but couldn't get the subclass to draw the web content before my annotations. At the time I just called the superclass draw method and then attempted to draw the annotations. Maybe I was being too simplistic about it, and that having my own graphics context or something would have made that work.


On 2009-10-24, at 3:36 AM, Mike Abdullah wrote:

WebView's don't support being layer-backed. But there is a private WebUIDelegate method that will let you achieve what you want:

- (void)webView:(WebView *)sender didDrawRect:(NSRect)rect;

On 24 Oct 2009, at 00:53, Luke Evans wrote:

I have an app that plain stopped working between Leopard and Snow Leopard.
This app relies on placing a WebView component in a Core Animation layer view hierarchy (i.e. "Needs Core Animation Layer" flag is turned on for this view and its superviews), so that I can draw annotations over the web content with a mostly-transparent 'glass view' in a layer above.


What I've found so far is that if I turn off the "Needs Layer" flag on the WebView and all its superviews, then the web content is visible. If I leave this flag on however, then all I get is a plain white area, with no web content visible (though this continues to be loaded).

I have logged this as a bug already - mostly because its a behaviour change between Leopard and Snow Leopard, and I have not found any documentation that indicate this is an intentional change.
However, it _might_ be intentional, or possibly I was already flying by the seat of my pants to have it working in the first place. In any case, perhaps somebody has some concrete knowledge on the subject...?


Cheers

-- Luke


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: WebView in a layer view hierarchy - not working on Snow Leopard
      • From: Mike Abdullah <email@hidden>
References: 
 >WebView in a layer view hierarchy - not working on Snow Leopard (From: Luke Evans <email@hidden>)
 >Re: WebView in a layer view hierarchy - not working on Snow Leopard (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: UITextField in UITableView covered by keyboard
  • Next by Date: Re: Crash drawing image
  • Previous by thread: Re: WebView in a layer view hierarchy - not working on Snow Leopard
  • Next by thread: Re: WebView in a layer view hierarchy - not working on Snow Leopard
  • Index(es):
    • Date
    • Thread