Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Vary For Trait"-aware? #20

Open
wdcurry opened this issue Jul 8, 2017 · 2 comments
Open

"Vary For Trait"-aware? #20

wdcurry opened this issue Jul 8, 2017 · 2 comments

Comments

@wdcurry
Copy link

wdcurry commented Jul 8, 2017

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.

@wdcurry
Copy link
Author

wdcurry commented Jul 8, 2017

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.

@aloco
Copy link
Owner

aloco commented Jul 10, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants