• 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: How to draw a NSView on top of a WebView and don't get overriden trying
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw a NSView on top of a WebView and don't get overriden trying


  • Subject: Re: How to draw a NSView on top of a WebView and don't get overriden trying
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 12 May 2015 15:31:56 -0700

> On May 12, 2015, at 1:44 PM, Juanjo Conti <email@hidden> wrote:
>
> If I add it as a subView of WebView or if I add it as a subView of the
> WebView's superView, it's shown for a while but if the WebView gets
> scrolled or if I load sites gmail.com <http://gmail.com/> or twitter (without logging in), the
> website hides my NSView.

In general this technique works, but some types of views use drawing optimizations that override the display of subviews. That might be happening with the WebView, especially since they render in an oddball way (the content is drawn in a separate sandboxed process.)

A child window will always draw correctly, but you’ll have to move it yourself when the web view scrolls, because its coordinates are relative to the parent window’s origin, not to the web view’s scroll position.

(You might also want to ask on the webkitsdk-dev mailing list, where the real WebKit experts can be found.)

—Jens
_______________________________________________

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


References: 
 >How to draw a NSView on top of a WebView and don't get overriden trying (From: Juanjo Conti <email@hidden>)

  • Prev by Date: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Next by Date: Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Previous by thread: Re: How to draw a NSView on top of a WebView and don't get overriden trying
  • Next by thread: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Index(es):
    • Date
    • Thread