ios - Remove mapView from parent, then add back later -


After

I am trying to remove my map view from parent view, then add it again at some point :

<(UISegmentedControl *) This {switch (sender.selectedSegmentIndex) {case 0: {if ([self.mapView isDescendantOfView: self.view] == incorrect) {[self.view insertSubview (IBAction) setMapType -> Ex: Index on Self.mapView: 0]; } break; } Case 1: [Removing Malformed ViewproductsView]; break; }}

When I click the second button in the control of my section, mapview is removed. However, when I click on the first button then it does not seem to add it back correctly. What does it mean that it has been added back to the parent scene but the map does not appear. I have subviews it with the same result And try to add the top bottom.

You might ask why I want to do this (as I myself am asking). I am trying to give my users the ability to point to different map types (except for iOS). MKMapView will talk on iOS maps that's awesome, but I want to throw RMMapView (mapbox / routeme) map view as well. I'm not sure what is the best way to swap in and out of this kind of map, should I swap the views of old maps and create news on swap? Or should I keep looking at old maps around but just watch them remove them?

Does this mean that it has been added back to the original view but the map Can not see.

It's really weird and it should not be so.

As an approach, I would recommend to keep a strong reference for both the map view on the first use of each, then to remove the unused one time, release / zero This, and the free memory above it, needs it the next time, rebuild it from the same style, center, and zoom level. In the case of Mappit, instead of zoom it might be easy to think in terms of area , however,


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -