• 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
WebView drawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebView drawRect


  • Subject: WebView drawRect
  • From: Leonardo <email@hidden>
  • Date: Wed, 19 Mar 2014 20:34:16 +0100
  • Thread-topic: WebView drawRect

Hi, I create a WebView, load the html code and add it to an NSView. It
works. Now I would like to do something better. I paste the html code within
my NSTextView, then in the textView's drawRect method, when the textView is
the first responder, I display the text, as usual. When the textView is not
the first responder, I would like to display the content of the webView.
I did this way, but it doesn't work.

// from my NSTextView subclass
- (void)drawRect:(NSRect)rect
{
    if(mInEditing == NO){
         [mWebView drawRect:rect];
    }
    else{
         [super drawRect:rect];
    }
}

If I replace mWebView with a regular NSView, this code works.
I can clearly see the content of that NSView. But it doesn't work with the
WebView. What do I miss there?


Regards
-- Leonardo


_______________________________________________

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 drawRect
      • From: Jens Alfke <email@hidden>
    • Re: WebView drawRect
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Speech to text for OS X Mavericks
  • Next by Date: Re: WebView drawRect
  • Previous by thread: Re: Speech to text for OS X Mavericks
  • Next by thread: Re: WebView drawRect
  • Index(es):
    • Date
    • Thread