infinitered / rmq

RMQ - RubyMotionQuery
MIT License
307 stars 52 forks source link

how to use UIAppearance with stylesheets, or otherwise default UI elements to "ios blue"? #312

Open sbauch opened 9 years ago

sbauch commented 9 years ago

Maybe an odd ask, but I would really like for a button that is added via rmq.append(UIButton, :action_button) to have the default iOS blue tint color.

I've found some answers on stack that provide the RGB values for that color, but I would think that hooking into UIAppearance would be a more flexible option.

Is this doable with RMQ? I suppose I could create a style that uses tintColor and the RGB of the iOS default, but I think it'd be more helpful to inherit by default the color of the most near UIAppearance (i.e. the superview, the view controller, the application window).

I'm grasping at straws a little bit here, but I found it odd that just adding a UIButton via rmq.append() with no style attributes inserts a button with seemingly clear text.

squidpunch commented 8 years ago

I haven't used UIAppearance much myself, but from what I can tell. If you have your appearance classes setup properly they should default to the proper color. You are correct if you create a button without adding any style information it will not have any styling and would be clear text, probably not the right size, etc...

I am assuming that if Appearance works then we should be able to work, but I dont have any experience using Appearance to be able to help much..

maybe if I can clear some time I can get a sample app and try and get a working example together.