robertwijas / UISS

UIAppearance Stylesheets
MIT License
1.23k stars 80 forks source link

How to apply style to specific UIButton ? #39

Closed Mohamed3amer closed 10 years ago

Mohamed3amer commented 10 years ago

Can i create two styles and apply one on button1 and another on button2 ??

robertwijas commented 10 years ago

UIAppearance selectors are based on classes and containment. So if you cannot distinguish your two buttons with that, you need to apply a workaround. I usually create empty UIButton subclasses, for example: CancelButton, OkButton.

robertwijas commented 10 years ago

Did that answer your question?

Mohamed3amer commented 10 years ago

I was hoping to be easier than this .. Anyway Good Job and Thank U :)

robertwijas commented 10 years ago

You should file a bug to Apple if you're missing this feature :)