clean up settings mechanism (fixes #9 & #62)

* init, load, persist, sync, clear
 * clean up frequent disk syncs which impacted iOS performance
 * insert disk sync into various iOS/OS X lifecycle events
 * implement clear
 * implement save on iOS
 * cleaner dictionary syntax
This commit is contained in:
Justin R. Miller
2014-02-13 12:21:35 -08:00
parent 62c79e05cd
commit 257ccd16bb
8 changed files with 88 additions and 109 deletions

View File

@@ -139,6 +139,11 @@ class MBXMapView
[displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
}
- (void)dealloc
{
mapView->settings.sync();
}
- (void)updateRender:(NSNotification *)notification
{
[self updateRender];
@@ -165,6 +170,8 @@ class MBXMapView
- (void)pauseRender
{
displayLink.paused = YES;
mapView->settings.sync();
}
- (void)render:(id)sender