WebView drawRect
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