SimpleButton
SimpleButton copied to clipboard
"Vary For Trait"-aware?
At present, the control completely blows VaryForTrait away. I think it is moderately easy to enable, but will have to review the Apple vids to confirm. This makes the corner radius attribute useless for a properly proportioned multi-device app.
If time permits, i will see if I can make it aware, then post back here, else (due to time constraints) will just tweak my deliverable to miss the mark as minimally as i can.
What is required is to respond to traitCollectionDidChange, and ensure the corner radius is set via the method .setCornerRadius plus determining the trait class you are responding to. Then all is good.
Hi, thanks for pointing this out! I don´t have a lot of experience with UITraitCollection´s, but as a first step, you can always subclass SimpleButton and add there traitCollectionDidChange support. Hopefully I find some time to look into it in more detail soon.