tombenner / nui

Style iOS apps with a stylesheet, similar to CSS
MIT License
3.76k stars 461 forks source link

Swap out nss styles by user interaction? #326

Open danielt1263 opened 8 years ago

danielt1263 commented 8 years ago

I have a requirement that my apps style should change when the user taps on a switch. I see in the docs that a programmer can edit the nss file dynamically, but what about swapping out the #nss file?

timbodeit commented 8 years ago

At my company we have an internal NUI fork, that already includes such functionality. I'll try to contribute a couple of the changes we made back to the main repository as soon as I can. Might take two or three weeks though, as I have a couple of exams coming up.

In the meantime, you can look at the frickelei branch of my fork on GitHub. What you'll need is the changeStylesheet: method on NUIRenderer.

Note: "Frickelei" can be translated to "tinkering". The branch is a place where I keep some commit -a style changes I got from other people and I would not recommend actually using it as a whole in a productive project.

bsl commented 8 years ago

Hi, this is great to hear. I need this functionality too. Can it go in? Thanks.