ClassyKit / Classy

Expressive, flexible, and powerful stylesheets for UIView and friends.
http://classykit.github.io/Classy/
MIT License
740 stars 76 forks source link

Styling properties set via setTitleTextAttributes #17

Closed keithnorm closed 10 years ago

keithnorm commented 10 years ago

Firstly, this project is freakin awesome.

Just wondering if there is support for setting something like text color for a UISegmentedControl which is done via setTitleTextAttributes:forState and takes a dictionary for the style settings?

Thanks.

cloudkite commented 10 years ago

Yes titleTextAttributes are supported see http://classy.as/properties/#nesting

UISegmentedControl {
  title-text-attributes[state:highlighted] @{
    foreground-color: magenta
  }
}

Thanks :+1:

keithnorm commented 10 years ago

Works perfectly. Thank you!