Re: Creating WebView in code
Re: Creating WebView in code
- Subject: Re: Creating WebView in code
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 28 Mar 2010 13:49:18 -0600
On Mar 28, 2010, at 12:44 PM, Jenny M wrote:
> Is it possible I could create it in a xib file and keep it invisible,
> and handle closing programmatically so it's not a waste of memory?
Yes.
> How
> would I go about this, or is there an easier way?
Subclassing NSView/WindowController, giving it a nib with a WebView, and doing whatever you need to do in that controller subclass would work. Or you could just create the WebView using -initWithFrame:. Note that I've found that WebViews that are not placed inside windows won't actually render anything, so you'll have to create a dummy window as well, though you won't need to open it.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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