MKMapView using a lot of memory each time i load its view

前端 未结 1 1635
迷失自我
迷失自我 2021-02-14 05:48

I have a pretty simple app, with a couple of view controllers. There is a MKMapView in the second view controller. It is set up correctly, and functions fine. The problem is, ea

相关标签:
1条回答
  • 2021-02-14 06:35

    This is not Swift issue, is coming from Objective-C days. The possible ways to handle this issue is depending upon the situation and behavior of the app.

    1. If you're using a Map for multiple times (or places), only create a single (shared) instance of it. Which you can use it whenever you want.

    2. Or If you're only using it for once, then try a solution from here, https://stackoverflow.com/a/25419783/1603234. This may help. Reduce little. But not all.

    0 讨论(0)
提交回复
热议问题