3 ms·
So, just out of curiosity, how would you even begin planning such a task? Let's say you want to do something simple, like an analogue clock app that takes minim
by javajosh 13y ago
So, just out of curiosity, how would you even begin planning such a task? Let's say you want to do something simple, like an analogue clock app that takes minimal user input (maybe a few look and feel settings). How would you structure that in Clojure in general, and Clojure-for-iOS in particular?
- Skinney 13y agoI would store application state in a atomic reference, and have "time" be updated every second by a timer. I would add a watch to the application state, so that every time application state changes, the UI is re-drawn. At least that's how I do most UI-apps in ClojureScript (re-draw auto magically when state changes). You'd do the same in Clojure-for-iOS. Of course, since you rely on Apples SDK for UI, you would use interop to subclass whatever needs subclassing, but the principle remains the same.