Switching between different mapViews

Discussion in 'iOS Programming' started by MACloop, Mar 1, 2010.

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    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
     
  2. KoolStar macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #2
    I personally would suggest just changing the pins.
     
  3. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #3
    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
     
  4. KoolStar macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #4
    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.
     

Share This Page