In macOS apps, users may want to tweak the look and feel of the application while it is running; pickers for background color, text color, font family, and text size, for example.
While it might be possible to store this as a JSON file and feed it back to the app, I think it'd be nice to have a dynamic Theme and Style with mutable properties which you can more directly bind to the settings pane. They would trigger layout updates on changes and expose the same public interface as static themes. (To realize this, I guess one will need a common Theme protocol and then both StaticTheme and DynamicTheme or similar; name suggestions would be welcome :))
While this in theory might be useful for iOS too, I think serializing the app settings as JSON into the user defaults works just as well. You switch between view controller scenes anyway, so there's less need for live updates. Which brings up the question: should this be part of the iOS target at all?
In macOS apps, users may want to tweak the look and feel of the application while it is running; pickers for background color, text color, font family, and text size, for example.
While it might be possible to store this as a JSON file and feed it back to the app, I think it'd be nice to have a dynamic
Theme
andStyle
with mutable properties which you can more directly bind to the settings pane. They would trigger layout updates on changes and expose the same public interface as static themes. (To realize this, I guess one will need a commonTheme
protocol and then bothStaticTheme
andDynamicTheme
or similar; name suggestions would be welcome :))While this in theory might be useful for iOS too, I think serializing the app settings as JSON into the user defaults works just as well. You switch between view controller scenes anyway, so there's less need for live updates. Which brings up the question: should this be part of the iOS target at all?