Reusing UIWebView is causing crashes

后端 未结 5 1557
礼貌的吻别
礼貌的吻别 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:26

    I can't help but think you'd be better off not re-using the UIWebView. Ditch the nib, create it programmatically and set it to nil and re-create/re-assign/re-alloc it when the data source changes.

    On a different note I would make sure to use NSOperationQueue for the data loading.

提交回复
热议问题