Reusing UIWebView is causing crashes

后端 未结 5 1522
礼貌的吻别
礼貌的吻别 2021-01-02 21:46

I\'ve read that reusing UIWebViews is kind of a bad practice. Some code I inherited at work is pushing a variety of content to a UIWebView. Powerpoints, Word documents, and

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 22:10

    In your UIWebViewDelegate, you could implement webView:shouldStartLoadWithRequest:navigationType: to return NO if there is already a request loading.

提交回复
热议问题