• 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
So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?


  • Subject: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
  • From: G S <email@hidden>
  • Date: Thu, 16 Jun 2011 19:15:25 -0700

My app is crashing after the user presses the Back button in the
navbar to dismiss a page that has a UIWebView on it, before the Web
view has finished loading.  The Web view subsequently tries call its
delegate to say that the content has finished loading.  In the Apple
docs I see this:

"Important: Before releasing an instance of UIWebView for which you
have set a delegate, you must first set the UIWebView delegate
property to nil before disposing of the UIWebView instance. This can
be done, for example, in the dealloc method where you dispose of the
UIWebView."

The delegate for the UIWebView is set up in the XIB file; it's pretty
hokey to have to intervene in code to then disassociate the view from
its delegate.  Also, there is no "dealloc method where you dispose of
the UIWebView", because that's done automatically when the view is
popped off the navigation stack.

Does anyone know if I'm interpreting this situation correctly?  I
guess the workaround is to set the UIWebView's delegate property to
nil in the UIWebView owner's "viewWillDisappear" method or something.

Thanks for any insight.

Gavin
_______________________________________________

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: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
      • From: David Duncan <email@hidden>
    • Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Drawing noise in Cocoa (preferably fast)
  • Next by Date: Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
  • Previous by thread: Re: How to get the code responsible for high CPU utilization
  • Next by thread: Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?
  • Index(es):
    • Date
    • Thread