BarreForestGuide/iOS-app — pull request #20 by agricocb (2014-11-25 04:17:45+00:00)
Title: A bunch of code clean-up, infrastructure enhancements, and tying of loose ends

Reworked the ConfigModel to add the mapSeason property, including a isSummerMapSeason helper method to determine if the map should be drawn with the trails colored by the summer use type or the winter use type. This includes the automatic setting, where the current date is used to determine if the date is after the spring equinox, but before the fall equinox, in which case the summer use types are used, and if not, the winter use types are used. Also, there is a trailTypeEnabled NSDictionary to track the user selection of the trail types on the Filter screen.

A new TrailColorUtil singleton object was created to use these new ConfigModel additions, (in addition to the mapType so that the satellite trails can be brighter in order to stand out against the predominant green color of the trees), and it will allow the MapViewController to simply ask what color a given trail use type should be drawn. Right now the code is stubbed out so that all user enabled trail types are red, and disabled trail types are 75% gray with a 50% alpha level, but it will be easily extensible as we decide what colors we want.

Added the code to make the "More info" and "Share" buttons dynamically added to the POI info bubbles based on whether there is a URL in the database for the POI, and whether the ConfigModel has the sharingEnabled property set to true, respectively. As I was doing that work, it became apparent that rewriting the code that generated the bubbles and auto-sized everything relative to the POI title text would make things easier and look nicer. That work is done, and it means that adding additional buttons to the POI info bubbles, should we have a reason to, will be a trivial one line per button change.

Also finally got around to adding the code to make the auto-tracking of map to the GPS location of the device work based on the users switch selection on the Settings page. It is my intent to have the auto-tracking automatically suspend if the user drags the map away from the GPS location, and then resume tracking when the user hits the "My Location" button, but the "My Location" button has stopped working for some reason (I suspect the story board is resizing something incorrectly, since the constraints are all messed up and don't current fit the map to *any* device's actual screen size...)