How to safely shut down a loading UIWebView in viewWillDisappear?

前端 未结 6 1214
温柔的废话
温柔的废话 2020-12-07 11:34

I have a view containing a UIWebView which is loading a google map (so lots of javascript etc). The problem I have is that if the user hits the \'back\' button on the nav ba

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 12:04

    The UINavigationController bug you're describing in the second part of your post might be related to your handling of memory warnings. I've experienced this phenomenon and I"ve been able to reproduce it on view n in the stack by simulating a memory warning while viewing view (n+1) in the stack.

    UIWebView is a memory eater, so getting memory warnings wouldn't be surprising when it's used as part of a view hierarchy.

提交回复
热议问题