ClassyKit / Classy

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

Switching stylesheets, UICollectionView (?) #57

Open sorted-bits opened 10 years ago

sorted-bits commented 10 years ago

In my application, when the application is launched, it sets a default stylesheet.

But then it starts communicating with our webserver, which tells the application which stylesheet should be loaded and it switches to a different stylesheet.

This works fine, but the UICollectionViews do seem to have a problem with the background color set in the stylesheet (and maybe other properties).

UICollectionViews also had the problem that they didn't appear correctly without using a cas_styleClass. Since I added that to the UICollectionView, the background is correctly set, but now while switching theme it appears to happen again.

mattsson commented 10 years ago

I've had the same issue with not seeing styling until I specifically set cas_styleClass.

sorted-bits commented 10 years ago

@mattsson did you have this with the UICollectionView or other views also?

mattsson commented 10 years ago

Also other views, e.g. UIButton.

cloudkite commented 10 years ago

@depl0y possibly a bug in that existing views don't get restyled when you switch stylesheets. I never tried switching stylesheets after the first one has loaded so there's probably a few things its not doing properly