Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Hi,

I am planning an App where one of the viewControllers is a MapViewController and I have a question about making the app effective and roboust.
The background:
Initially there is map displayed with say 100 pins (could show 3 different categories of pins). In the navigation there is a segmented control which will let the user to filter the pins and clicking one of the elements in the segmented control shows only the pins of one of the categories.

The question:
Which is the best way of dealing with this? Shall I define 4 different mapViews (one to show all the category-pins, 3 to show the respective category)? Or is it better to only have one mapView and replace the pins everytime the user choses a particular category? I suppose that both solutions would work? My goal is to make this app roboust and effective from a memory management point of view...

Any ideas?
Thanks in advance!
MACloop
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
I personally would suggest just changing the pins.

Yes that makes sense. The only thing that I thought is that it may need more memory to create those "new" views over and over insteadof only creating the maps at first and to simply display the later on.

Thanks alot for your comment!
MACloop
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
Are the pins being updated a lot? By the way, the mapview only allocates memory when the pins appear on the screen. If the pin is loaded but not visible it will not allocate memory until the pin is going to be in the view. That is the only reason that I suggest just reloading the pins.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.