So i have a UIScrollView with UIPageControl which has a bunch of MKMapViews (mostly 15 different maps). The app is really sluggish once this view loads and after a few minutes of usage i get a memory warning. I looked at it in Instruments and the maps take an insanely high chunk of memory. Even upto ~200mb sometimes. One thing i can think of is to reuse the mapViews. But because of how the views are structured the coding complexity increases. Any suggestions how i can improve performance?
This is how my app is structured:
I have a view controller which has a UIScrollView which i use for horizontal scrolling. In the scrollView i read subviews from an array of view controllers which contains the mkmapview.
Hope that made sense! I used Apple's pageControl sample app as a point of reference while coding so the design is roughly similar.
Thanks in advance!
EDIT: So i tried adding a single instance of the mapView and changing the coordinates on swiping. It still takes a decent amount of memory.