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

Creating WebView in code


  • Subject: Creating WebView in code
  • From: Jenny M <email@hidden>
  • Date: Sun, 28 Mar 2010 11:44:32 -0700 (PDT)

Hi all,

Going back a bit to my printing problem (http://groups.google.com/
group/cocoa-dev/browse_thread/thread/
cbf57025f0c2a7e0/99d39008358da90b), I'd like to call print on a
WebView which loads a locally-generated HTML file that is created
specially when my print function is called. So I'd like to create and
initialize a WebView behind the scenes, in code - and this is where
I'm stuck.

I can call WebView myWebView and myWebView loadRequest but that does
no good because I haven't actually CREATED the webview. Every WebView
code example I see loads an HTML file in a WebView when it's awaken
from the nib, so it's created already, which isn't going to be the
case for me. I am pretty sure it's possible because I saw this post
here:
http://www.stevenhuey.com/category/cocoa
but even his example code has the nib file loaded and visible.

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? How
would I go about this, or is there an easier way?

Thanks,
Jenny
_______________________________________________

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: Creating WebView in code
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Solving memory leaks
  • Next by Date: Re: Solving memory leaks
  • Previous by thread: Re: Wrapping a C function library (as source) in an ObjC class...
  • Next by thread: Re: Creating WebView in code
  • Index(es):
    • Date
    • Thread