A Color Inspector in RubyMotion
While working on Everyday Journal, I sidetracked a little and built this prototype of a color inspector in RubyMotion (code link) that can be used to change the background, foreground and tint colors of UIViews.
Just run do any of the following to bring up the inspector:
v.edit_fg #foreground. Works for buttons too
v.edit_bg #background
v.edit_tint #tintColor
It helps to alt-click on the UIView in the simulator first, then you can just use self to refer to the target view.
I’m not sure where to take this next or if it can ever be made useful though. Any suggestions?
PS: In Self and Squeak (and similarly in Pharo), you can modify your code and the changes are reflected immediately in your running image. I have always been intrigued by Morphic) halos and inspectors in Self and Squeak. RubyMotion brings us a little bit closer with a REPL running alongside the iOS simulator, but it can’t live reload code yet.